iOS Question XML in http

Discussion in 'iOS Questions' started by iCAB, Jun 14, 2018.

  1. iCAB

    iCAB Well-Known Member Licensed User

    Hi All

    I am facing an issue with an http call that has an XML parameter. The call works perfectly ok with B4A, but not with B4I

    Unfortunately, I can't post the call in here, but even if I try something like this,
    Code:
    job1.Download( $"http://www.google.ca?"$ & $"func=<abc>"$  )
    I get the same results
    "ResponseError: unsupported URL, status code: 0"

    I tried using EscapeXml code provided in this link. :
    https://www.b4x.com/android/forum/threads/escapexml-code-snippet.35720/
    The job returns successful but unfortunately the host returns error ( unable to parse the request)

    I was wondering, what is the actual difference between the B4A call and the B4I.
    I am using the http libraries provided in here
    https://www.b4x.com/android/forum/threads/b4x-okhttputils2-ihttputils2-httputils2-source-code.82632/

    Any help is greatly appreciated.

    Thanks
    iCAB
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    You are not using the smart string literal correctly. You never need to concatenate strings when you use the smart string literal.

    Disable ATS if you want to call non-https links:
    Code:
    #ATSEnabled: False
    Correct code:
    Code:
    j.Download2( $"http://www.google.ca"$Array As String("func","<abc>"))
     
    iCAB likes this.
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