Android Question Okhttputils2 and redirects

DonManfred

Expert
Licensed User
Longtime User
yes. Use the source version, do the changes and use the source instead of the library. You also can compile the modified source as a library again...
 
Last edited:
Upvote 0

wimpie3

Well-Known Member
Licensed User
Longtime User
The instructions are to replace the initialize Sub in httputils2service with this code (source downloaded on https://www.b4x.com/android/forum/threads/b4x-okhttputils2-ihttputils2-httputils2-source-code.82632/):

B4X:
Sub Initialize
   If hc.IsInitialized = False Then
     TempFolder = File.DirTemp
     Dim jo As JavaObject = hc
     Dim builder As JavaObject = jo.RunMethod("sharedInit", Array("hc"))
     builder.RunMethod("followRedirects", Array(False))
     jo.SetField("client", builder.RunMethod("build", Null))     
     TaskIdToJob.Initialize
   End If
End Sub

However, there IS not initialize sub in httputils2service... and when I ADD the sub, I get the error that dirtemp is an unknown member.
 
Upvote 0
Top