I'm trying to make a call to an API (MVC). From the Postman application the call is made correctly, the received data being correct. If I try to make the same call from the B4A application, I get an error message: ResponseError. Reason: Not Found, Response: {"Message": "No HTTP resource was found that matches the request URI 'http://builders.test.com/api/Mobile'."}
The code is:
In the attached image is a printscreen from Postman in which you can see the parameters with which the API responds correctly. What am I not doing well?
The code is:
B4X:
Dim jobDownload As HttpJob
jobDownload.Initialize("jobLoad", Me)
jobDownload.PostString("http://builders.test.com/api/Mobile", "aidiUser=" & userId & "&Tipe=1")
jobDownload.GetRequest.SetHeader("Authorization", "Bearer " & Token)
jobDownload.GetRequest.SetHeader("Accept", "application/json")
Wait For (jobDownload) JobDone(j As HttpJob)
If j.Success Then
................
Else
MsgboxAsync(jobDownload.ErrorMessage,"jobLoad") <---------- message
End If
jobDownload.Release()
In the attached image is a printscreen from Postman in which you can see the parameters with which the API responds correctly. What am I not doing well?