Hi,
I am using jOKHttpUtils2.
I am calling PostString.
I need to remove the headers: "Accept-Encoding" and "User-Agent". Is it possible?
Here is my code:
But the headers "User-Agent" and "Accept-Encoding" still sent to the server.
Thanks,
Ran
I am using jOKHttpUtils2.
I am calling PostString.
I need to remove the headers: "Accept-Encoding" and "User-Agent". Is it possible?
Here is my code:
B4X:
Dim http As HttpJob
Dim url As String
Dim sResponse As String
http.Initialize("", Me)
url = "http://" & txtIPAddress.Text & ":" & txtTCPPort.text
sResponse = http.PostString(url, s)
http.GetRequest.SetContentType("application/json")
http.GetRequest.SetHeader("Content-Length", s.Length())
http.GetRequest.RemoveHeaders("User-Agent")
http.GetRequest.RemoveHeaders("Accept-Encoding")
But the headers "User-Agent" and "Accept-Encoding" still sent to the server.
Thanks,
Ran
Last edited: