Hi all,
(Apologies if I'm posting this in the wrong place- I don't post very often!)
I updated the OkHttpUtils2 internal library in B4A to v3.02 yesterday and immediately noticed some of the POSTs / PUTs in my code are timing out with a socket exception where it was fine with v3.01. As as example of code I am using:
GETs / downloads are fine.
Switching back to v3.01 resolves the problem instantly. After a bit of investigation, it would seem that I can circumvent the problem by explicitly setting the content-type header (probably good practice anyway):
This isn't the end of the world, but it does break some of my legacy code where the content-type isn't set. Also I am concerned there may also be other issues with this version if this is just a symptom of another problem. Has anyone else noticed this issue, or am I doing something wrong?
As I say, v3.01 works flawlessly.
Thanks in advance!
(Apologies if I'm posting this in the wrong place- I don't post very often!)
I updated the OkHttpUtils2 internal library in B4A to v3.02 yesterday and immediately noticed some of the POSTs / PUTs in my code are timing out with a socket exception where it was fine with v3.01. As as example of code I am using:
B4X:
Dim j As HttpJob
j.Initialize("", Me)
j.Username = "XXXXX"
j.Password = "XXXXX"
j.PostString(ServerUrl, Json.ToString)
Wait For (j) JobDone(j As HttpJob)
Dim Success As Boolean = ProcessServerResponse(j)
j.Release
GETs / downloads are fine.
Switching back to v3.01 resolves the problem instantly. After a bit of investigation, it would seem that I can circumvent the problem by explicitly setting the content-type header (probably good practice anyway):
B4X:
j.GetRequest.SetContentType("application/json")
This isn't the end of the world, but it does break some of my legacy code where the content-type isn't set. Also I am concerned there may also be other issues with this version if this is just a symptom of another problem. Has anyone else noticed this issue, or am I doing something wrong?
As I say, v3.01 works flawlessly.
Thanks in advance!