Hello everyone.
I had the need to update an application that uses a client API.
But the client updated the URL of that API.
https://serverxxxxx/v3/api
to
https://serverxxxxx/v3.1/api
The following was updated in the code:
targetSdkVersion="32" to targetSdkVersion="34"
Now HttpJob is not executed and ErrorMessage does not specify anything
I would like to know how to identify in the log what the error is.
Or if anyone has any suggestions to help me solve this
Thankful in advance
I had the need to update an application that uses a client API.
But the client updated the URL of that API.
https://serverxxxxx/v3/api
to
https://serverxxxxx/v3.1/api
The following was updated in the code:
targetSdkVersion="32" to targetSdkVersion="34"
B4X:
' Dim endpointUrl As String = "https://serverxxxxx/v3/api" 'the previous url
Dim endpointUrl As String = "https://serverxxxxx/v3.1/api" 'the new url
Dim ok As HttpJob
ok.Initialize("",Me)
ok.PostString(endpointUrl,data)
ok.GetRequest.SetHeader("Authorization", "reg-platform us10")
ok.GetRequest.SetHeader("Cache-Control","no-cache")
ok.GetRequest.SetHeader("APIKey","123456")
ok.GetRequest.SetContentType("application/json")
Wait For (ok) Jobdone(ok As HttpJob)
If ok.Success Then
Log(ok.GetString)
Else
Log(ok.ErrorMessage) 'Just show this in the log:
'ResponseError. Reason: , Response:
End If
Now HttpJob is not executed and ErrorMessage does not specify anything
I would like to know how to identify in the log what the error is.
Or if anyone has any suggestions to help me solve this
Thankful in advance