Android Question OkHttp & OkHttputils2 replacing Http & OkHttpUtils2

ciginfo

Well-Known Member
Licensed User
Longtime User
Hello,
I can't replace Http & Httputils2 by OkHttp & OkHttpUtils2

I replace "Http" &" Httputils2" with "OkHttp" & "OkHttpUtils2"
I Delete " HttpUtils.bas" and "HttpUtilsService.bas"
I replace "HttpUtils as HttpClient" with "HttpUtils as OkHttpClient"

But, all are unknown members
"HttpUtils.Download" & "HttpUtils.CallbackActivity"
HttpUtils.CallbackActivity = "Main"
HttpUtils.CallbackJobDoneSub = "JobDone"
HttpUtils.CallbackUrlDoneSub = "UrlDone"
HttpUtils.PostString("POST Job1", PostUrl, "key1=value1&key2=value2")

What else do I have to change?
Thank you for your help.
 
You are using the very very old HttpUtils (1). OkHttpUtils2 replaced HttpUtils2.

You should switch to OkHttpUtils2, however the API is a bit different. Luckily it is much simpler and more powerful.

 
Upvote 0
Yes, because i'm modifing indeed a very old appli.
But if i use OkHttpUtils2 i have much code to change no ?
 
Upvote 0
Back
Top