B4A Tutorial [B4X] OkHttpUtils2 with Wait For - Erel    
Dec 25, 2025   
(60 reactions) have a single sub that handles all requests results.
Simplest example:
Dim j As HttpJob
j.Initialize("", Me)
j.Download("https://www.google.com")
Wait For (j) JobDone(j As HttpJob)
If j.Success Then
Log(j.GetString)
End If
j.Release
Example of downloading a quote from a quotes service:
Sub DownloadQuote
Dim j As HttpJob
j.Initialize("", Me) 'name is empty as it is no longer needed
j.Download("http://quotesondesign.com/wp-json/posts?filter...
B4A Tutorial [B4X] OkHttpUtils2 / iHttpUtils2 and accept all option - Erel    
Jul 27, 2025   
(17 reactions)Note that OkHttpUtils2, jOkHttpUtils2 and iHttpUtils2 are actually the exact same b4x library.
Starting from v2.90 it is very simple to initialize the internal http client with the 'accept all' option.
The accept all option means that certificates will not be validated.
It is done... conditional symbol:
HU2_PUBLIC - makes the http client variable (hc) a public variable. This can be used in...: https://www.b4x.com/android/forum/threads/ntlm-again.110485/#post-690641
Note that in...
B4A Library OkHttp - Replaces the Http library - Erel    
Mar 14, 2018   
(22 reactions)OkHttpUtils2 source code: OkHttpUtils2 / iHttpUtils2 / HttpUtils2 source code
It is included as an internal library.
Usage: OkHttpUtils2 with Wait For
The current Http library is based on the Android version of Apache HttpClient. Google has stopped updating this SDK a long time ago and... implementation.
Note that if you are using HttpUtils2 (as you should) it is also based on Http library.
The OkHttp library is based on the OkHttp SDK: http://square.github.io/okhttp/
As this is a newer SDK...
B4A Tutorial Download huge files with HttpUtils2 - Erel    
Jul 25, 2021   
(18 reactions)Better to use: https://www.b4x.com/android/forum/threads/simple-progress-http-download.127214/#post-796463
The attached project includes a slightly modified version of HttpUtils2 and a new service... size.
http://www.b4x.com/basic4android/images/SS-2013-06-13_17.34.35.png
It is very simple to use...) & "KB"
End Sub
Sub dd_Complete(Job As HttpJob)
Log("Job completed: " &... are required:
OkHttp
StringUtils
Phone (required in order to acquire a partial lock during the download...
B4J Library [B4X] xHttpServer (Http Server + jQuery) - Star-Dust    
Oct 20, 2026   
(39 reactions)It is a personal project of mine that I started as a hobby on B4i and it has become an interesting project, so that I have modified it to be multiplatform.
It is an http server, which allows a browser to navigate on html pages stored on the device. In addition, dynamic pages can also be created....
aHttpServer
Author: Star-Dust
Version: 0.83
QueryElement
Events:
change (Resp As ServletResponse... the SendString
Properties:
OutputStream As OutputStream
Query As QueryElement
httpServer
Events...
B4A Question Needing okHTTP support for Android 4.x - JakeBullet70    
Jun 22, 2022Hi all.
Working on an app that will NEVER see the play store and will be open source, GITHUB style. Anyway i want it to run on Android 4.x and above.
Point being to re claim all those old Android devices every one just tosses in a drawer or the garbage dump and never use again.
Am using the latest B4A and ran into issues where some libraries need a a newer API then the old phones . tablets have.
1st problem is OkHttpClient. It wants API level 21, I believe I need 16.
Question, Should I go...
B4A Code Snippet Set HTTP Request Header with OkHttpUtils2 - Erel    
Sep 17, 2018   
(12 reactions)Description: The following code allows you to set the request headers before the request is sent. This is useful for example with sites that block requests without a User-Agent header.
This code depends on HttpUtils2 and Http libraries:
Dim j As HttpJob
j.Initialize("job name", Me)
j.... However internally HttpJob uses CallSubDelayed to send the request. So the request will only be sent....
The content type header should be set with SetContentType.
Tags: http headers, httputils2, user agent...
B4J Tutorial [server] jOkHttpUtils2 - server version - Erel    
Jan 9, 2022   
(9 reactions)OkHttpUtils2 methods are designed to be called on the main thread. This is the case in all platforms and configurations, except of B4J server solutions.
Starting from jOkHttpUtils2 v2.95 it is possible to make it thread safe. This is done by following these steps:
1. Add the SERVER conditional symbol to the build configuration (Ctrl + B).
2. Add a reference to jBuilderUtils. Library: https... request is sent: OkHttpUtils2 - server mode!
Relevant tutorial: Resumable Subs (wait for / sleep...
B4A Tutorial HttpUtils2 - Web services are now even simpler - Erel    
Feb 28, 2016   
(18 reactions)HttpUtils2 was replaced with OkHttpUtils2: https://www.b4x.com/android/forum/threads/okhttp-replaces-the-http-library.54723/
Both libraries are included in the IDE.
HttpUtils2 is a small framework that helps with communicating with web services (Http servers).
HttpUtils2 is an improved version of HttpUtils.
The advantages of HttpUtils2 over HttpUtils are:
Any number of jobs can run...)
HttpUtils2 requires Basic4android v2.00 or above.
It is made of two code modules...
Share My Creation [Web][SithasoDaisy] Revolutionize Your Ride: The Ultimate Vehicle Expense Tracker App using Api Key Secure MySQL REST API on top of HTTPS - Mashiane    
Apr 30, 2024   
(2 reactions)
Source Code (SithadoDaisy)
What you need to deploy?
HTTPS
Api Key for your MySQL backend... of appreciation amounting to $5.
https://paypal.me/anelembanga?country.x=ZA&locale.x=en_US
Related Content
https://www.b4x.com/android/forum/threads/web-sithasodaisy-deciding-on-shared-hosting-vs-vps-hosting-the-vehicle-expense-tracker-webapp-use-case-pocketbase-mysql.160865/#content
https://www....147905/#content
https://www.b4x.com/android/forum/threads/web-creating-secure-mysql-rest-api-based...
Page: 1  
2  
3  
4  
5  
6  
7