Android Tutorial [B4X] OkHttpUtils2 / iHttpUtils2 and accept all option

Erel

Administrator
Staff member
Licensed User
Note that OkHttpUtils2, jOkHttpUtils2 and iHttpUtils2 are actually the exact same b4x library.
jOkHttpUtils2_NONUI was required as a special version for non-ui B4J apps. It is no longer required and shouldn't be used.

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 by adding the following conditional symbol (Ctrl + B):
HU2_ACCEPTALL

There is another configurable conditional symbol:
HU2_PUBLIC - makes the http client variable (hc) a public variable. This can be used in cases where you want to customize the internal behavior. It is more relevant to B4J and B4A.
Example: https://www.b4x.com/android/forum/threads/ntlm-again.110485/#post-690641
 
Last edited:

Erel

Administrator
Staff member
Licensed User
Is the source code of iHttpUtils 2.9 available?
1. Note that OkHttpUtils2, jOkHttpUtils2 and iHttpUtils2 are actually the exact same b4x library.

2. The source code of b4x libs is included inside the b4xlib file. It is a zip file.
 

awama

Active Member
Licensed User
Note that OkHttpUtils2, jOkHttpUtils2 and iHttpUtils2 are actually the exact same b4x library.
jOkHttpUtils2_NONUI was required as a special version for non-ui B4J apps. It is no longer required and shouldn't be used.

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 by adding the following conditional symbol (Ctrl + B):
HU2_ACCEPTALL

There is another configurable conditional symbol:
HU2_PUBLIC - makes the http client variable (hc) a public variable. This can be used in cases where you want to customize the internal behavior. It is more relevant to B4J and B4A.
Example: https://www.b4x.com/android/forum/threads/ntlm-again.110485/#post-690641
 
Top