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

Discussion in 'Tutorials & Examples' started by Erel, Oct 20, 2019.

  1. Erel

    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: Oct 20, 2019
  2. peacemaker

    peacemaker Well-Known Member Licensed User

    Is v2.90 already published ?
     
  3. Erel

    Erel Administrator Staff Member Licensed User

  4. peacemaker

    peacemaker Well-Known Member Licensed User

    But there is v.2.80... OK, nevermind.
     
  5. aeric

    aeric Active Member Licensed User

    After I updated, it shows Version 2.90 ;)
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice