Android Question ERROR in HttpJob: NullPointerException:.... on a null object reference

PierPaduan

Active Member
Licensed User
Longtime User
Hi,
I have an HttpJob where I'm trying to set the header in the following way.
LastToken is sent from the server to the client.

B4X:
    Dim TokenHeaderName As String = "Authorization"
 
    Dim j2 As HttpJob
    j2.Initialize("send", Me)
    j2.GetRequest.SetHeader(TokenHeaderName, LastToken)
    j2.PostString(link_server, StringaJSON )

but I obtain the following error.

Any suggestion to fix this problem?
Thanks a Lot to everyone.
Best regards.

 

PierPaduan

Active Member
Licensed User
Longtime User
Thanks Don, but I cannot switch to new okhttps because I use an old version of B4A that don't have those libs in the internal libs.

Any other suggestion?
Thanks
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…