L lip Active Member Licensed User Longtime User Aug 22, 2016 #1 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 Code: Copy 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...
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 Code: Copy 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 Aug 22, 2016 #2 for http you need to check okhttp lib instead.. Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Aug 22, 2016 #3 Note that you should use OkHttpUtils2 instead of OkHttp directly. It includes support for multipart requests. Upvote 0
Note that you should use OkHttpUtils2 instead of OkHttp directly. It includes support for multipart requests.
agus mulyana Member Licensed User Longtime User Oct 12, 2016 #4 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
Dear Is there a sample code, how to upload an image from B4A to PHP using multipart from OKHTTPUTILS2? thank you so much
DonManfred Expert Licensed User Longtime User Oct 12, 2016 #6 upload a sample project which shows the problem. Upload the used php-file too Upvote 0