Android Question HttpJob How to know if 401 Unauthorized result

rlens

New Member
Hi All, I'm new for B4A

I search already about this but I can't see any result here in community.

How can I tell if my request is 401 or Unauthorized?
Even when I debug to see what is the content of the "j" I can't see if my request is Unauthorized
here my example code

Private Sub ProcessHttpJob(j As HttpJob, auth As Boolean) As ResumableSub

j.GetRequest.Timeout = 20000
Wait For (j) JobDone(j As HttpJob)
Dim result As HttpJobResult
result.Initialize
result.success = j.Success
If result.Success Then
result.response = j.GetString
Else
result.response = j.ErrorMessage
End If
j.Release
Return result
End Sub
 

teddybear

Well-Known Member
Licensed User
Please use code</> to post your code.
You should get j.Response.StatusCode instead of j.GetString
 
Upvote 0
Top