Android Question okHTTP Library

lip

Active Member
Licensed User
Longtime User
I'm setting up a new PC with B4A v6.00. I previously used v5.40.

I used to include the HTTP library but have now included okHTTP.

Code includes this
B4X:
Dim hc as HTTPClient
hc.Initialize("hc")

Dim req As HttpRequest
            req = MultipartHTTP.CreatePostRequest(Starter.HTTPServerSync & "BitmapUpload.aspx", NameValueMap, UploadFileList)
hc.Execute(req, 1)

I'm getting this error message on compile:-

hc.Execute(req, 1)
javac 1.8.0_102
src\liteip\liteip3\commandengine.java:2919: error: cannot access ClientProtocolException
_hc.Execute(processBA,_req,(int) (1));
^
class file for org.apache.http.client.ClientProtocolException not found

Any help appreciated...
 

DonManfred

Expert
Licensed User
Longtime User
for http you need to check okhttp lib instead..
 
Upvote 0

agus mulyana

Member
Licensed User
Longtime User
Dear

Is there a sample code, how to upload an image from B4A to PHP using multipart from OKHTTPUTILS2? thank you so much
 
Upvote 0
Top