Android Question Okhttputils2 and redirects

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
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/):

Code:
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
Back
Top