Hi, I am consuming an REST API by 4G cellular connection, but when the connection is poor, they tell me that the API reports a double Request (I am not the owner of the API, it is third-party). If the connection is strong, it does not duplicate the Request.
Has anyone experienced this failure?
This is the Code:
I will appreciate any help you can give me.
Regards
Has anyone experienced this failure?
This is the Code:
B4X:
Sub API
Try
Dim XJob As HttpJob
Dim XML As String
Dim sJSON As String
XML = "XML Content......"
XJob.Initialize("FEL", Me)
XJob.PostString("https://api.com.gt/res", XML)
XJob.GetRequest.SetContentType("application/xml")
XJob.GetRequest.SetHeader("ID", "001")
XJob.GetRequest.SetHeader("KeyApi","3406D1A2CEBA15C02D37CD5A060A573")
XJob.GetRequest.Timeout = 6000
Wait For (XJob) JobDone(XJob As HttpJob)
If XJob.Success Then
sJSON = XJob.GetString
Else
Log("XJobError: " & XJob.ErrorMessage.Trim)
End If
XJob.Release
Catch
Log(LastException)
End Try
I will appreciate any help you can give me.
Regards