code used
Code: Select all
Procedure HttpGetEvent(Success, Result$, UserData)
If Success
Debug Result$
Else
Debug "HTTPRequest(): Error"
EndIf
EndProcedure
NewMap Headers.s()
Headers.s("myAuth") = "12345"
Headers.s("x-customvalue") = "10"
HTTPRequest(#PB_HTTP_Get, "http://192.168.1.199/config/1", "", @HttpGetEvent(), 0, Headers())
however it send followng data (OPTIONS instead of POST) and NO headers
Code: Select all
http://192.168.1.199/conf/1
OPTIONS /conf/1 HTTP/1.1
Host: 192.168.1.199
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:52.0) Gecko/20100101 Firefox/52.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: el-GR,el;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Access-Control-Request-Method: POST
Access-Control-Request-Headers: myAuth,x-customvalue
Origin: http://127.0.0.1:9080
Connection: keep-alive
HTTP/1.1 400 Bad Request
Content-Type: text/html
Content-Length: 0
Connection: close
AuthInfo: