I've used this code on other occasions and it worked, now I've been trying to figure it out for a day and I can't.
error is: {"Message":"No HTTP resource was found that matches the request URI 'http://api.mysite.eu/api/togglefirma'."}
The API works, an image from Postman is attached
B4X:
Dim values As Map = CreateMap("aidi": Main.idFirmaCurenta)
Dim JSONGenerator As JSONGenerator
JSONGenerator.Initialize(values)
Dim j As HttpJob
j.Initialize("",Me)
Dim encodedValues As String = UrlEncodeMap(values)
Log(encodedValues)
j.PostString("http://api.mysite.eu/api/togglefirma",encodedValues)
j.GetRequest.SetHeader("Authorization","Bearer " & Main.Token)
j.GetRequest.SetContentType("application/x-www-form-urlencoded")
wait for (j) JobDone(job As HttpJob)
If job.Success Then
Log('OK')
Else
Log(job.ErrorMessage)
End If
error is: {"Message":"No HTTP resource was found that matches the request URI 'http://api.mysite.eu/api/togglefirma'."}
The API works, an image from Postman is attached