i bought your product 2 days ago (V1.20) and now i have this difficult problem (http lib 1.05)
im using httpclient to post data to an php page on my apache server (ssl, basic auth).
-when useing a get request all is working fine - basic auth via executecredentials is working fine with my ssl php site.
-when using a post request i get error 401 - authorization required and i see 2 logging entries in my apache access_log. the first has no username and has 401 return code - the second has the correct username and return 200 but the php script didnt work - in my app i allways get 401
for me it is important to use POST requests
in Activity_Create
B4X:
HttpClient1.InitializeAcceptAll("HttpClient1")
in a sub
B4X:
Dim data As String
Dim i As InputStream
data="param1=test"
i.InitializeFromBytesArray(data.GetBytes("UTF-8"),0,data.Length)
request.InitializePost("https://server/getlist.php",i,data.GetBytes("UTF-8").Length)
request.Timeout = 10000
If HttpClient1.ExecuteCredentials(request,1,"username","pwd")=False Then Return "process allready running"
The credentials are not sent automatically. The server should return 401 (authentication required) and then in the second request the credentials are being sent (in Basic or Digest mode based on the server first response).
This is why you see the first empty request.
Can you check if the data is being sent to the server?
the differences i see is http header field order different, the "Accept" header in curl, no "Authorization" header in b4a and "Connection: Keep-Alive" in b4a
when i use curl to test my apache ssl,php server i have only one entry in my apache log, when i use b4a i hav 2 entries as mentioned before.