I iCAB Well-Known Member Licensed User Longtime User Jun 14, 2018 #1 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, B4X: 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
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, B4X: 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
Erel B4X founder Staff member Licensed User Longtime User Jun 14, 2018 #2 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: B4X: #ATSEnabled: False Correct code: B4X: j.Download2( $"http://www.google.ca"$, Array As String("func","<abc>")) Upvote 0
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: B4X: #ATSEnabled: False Correct code: B4X: j.Download2( $"http://www.google.ca"$, Array As String("func","<abc>"))