Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Call C# functions from anywhere using URL (HTTP server)
#7
AutoHotkey client examples.
 
Code:
Copy      Help
LaHttpCall("http://localhost:4455/Parameters", "a=aa&b=one+two", "password278351")

MsgBox % LaHttpCall("http://localhost:4455/Add", "x=100&y=2")

LaHttpCall(url, params:="", password:="") {
    http := ComObjCreate("WinHttp.Winhttprequest.5.1")
    http.Open("POST", url)
    if not password=""
        http.SetCredentials("-", password, 0)
    http.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded")
    http.Send(params)
    return http.ResponseText
}


Messages In This Thread
RE: Call C# functions from anywhere using URL (HTTP server) - by Gintaras - 06-07-2023, 10:13 AM

Forum Jump:


Users browsing this thread: 3 Guest(s)