Android Question Okhttputils2 and redirects

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
Cookies are required to use this site. You must accept them to continue using the site. Learn more…