Android Question HttpUtils2 consuming httpPut Method [Solved]

jruiz1998

Member
Licensed User
Longtime User
Hi everybody
I have a problem to send an http string from B4A to consume a Web Api with httpPut Method.

http string example:
(https://XYZwebapp.azurewebsites.net/api/ApiUpdates/[email protected]&Name=Joseph...)

1) I have a c#, .net, core 2.0 WebApi to update a record using HttpPut Method.
2) I tested the http string with Postman tool and it worked very well.
3) I want to send the same http string from B4A using httpUtils2 library (j.PostString) and I received a message error (ResponseError. Reason: Not Found, Response: )

Dim j As HttpJob
j.Initialize("", Me)
j.PostString(PostUrl5, Parameters)
Wait For (j) JobDone(j As HttpJob)
If j.Success Then
Log("J = " & j.GetString)
Else
Log("ERROR: " & J.ErrorMessage)
End If
j.release

4) I changed j.PostString by j.PutString and I recevied other message error (lot of html)

Could you tell me, the way to consume a httpPut Method Web Api, from B4A?
By the way, I have httpGets and httpPosts within .Net Core and they are consumed very well from B4A, but HttpPut is my problem.
Thanks a lot
JRuiz
 

jruiz1998

Member
Licensed User
Longtime User
Incredible, I spent 6 hours yesterday afternoon trying everything and changing to j.PutString and it did not work, Today I do it again (with your suggestion) and it works correctly.
The only difference I see is that the speed of the network in the office is better than the speed of my house. I'm not sure if that has anything to do with it.
Thanks Erel, as always, great Support.
I see you ask for a code, but I do not know what you're referring to.
And I do not know how to close this question and leave it as solved.

Thanks a lot
JRuiz
 
Upvote 0
Top