This update changes the way that bytes arrays are managed in HttpRequest.InitializePost2. This change allows HttpClient to retry and resend the data in case of IO errors. It makes POST calls more stable.
Some errors are now printed to the unfiltered log and give more information about the error.
Edit: The Response object which is passed to HttpClient_ResponseError is not consumed automatically. It allows you to read the message sent from the server.
However it also means that you are responsible to call Response.Release eventually.
Typical code should look like:
Installation instructions:
- Unzip the attached file.
- Copy both files to the internal libraries folder: C:\Program Files\Anywhere Software\Basic4android\Libraries
Some errors are now printed to the unfiltered log and give more information about the error.
Edit: The Response object which is passed to HttpClient_ResponseError is not consumed automatically. It allows you to read the message sent from the server.
However it also means that you are responsible to call Response.Release eventually.
Typical code should look like:
B4X:
Sub hc_ResponseError (Response As HttpResponse, Reason As String, StatusCode As Int, TaskId As Int)
Log("Error: " & Reason & ", StatusCode: " & StatusCode)
If Response <> Null Then
Log(Response.GetString("UTF8"))
Response.Release
End If
End Sub
- Unzip the attached file.
- Copy both files to the internal libraries folder: C:\Program Files\Anywhere Software\Basic4android\Libraries