Erel,
I'm using httputils2 to retrieve a remote json string.
Wierd thing is that when I retrieve it from a classic ASP page, it goes fine, but when I try to pull it from a VB.Net page, it responds an empty string. Do you know what this could be?
Classic ASP URL: http://autorizalo.inoba.com/ext/bac...imE8pjWgOD0k6&token=123456&mobile=56991296532
.NET URL: http://autorizalo.inoba.com/ext/def...imE8pjWgOD0k6&token=123456&mobile=56991296532
The code for the request is:
The LOG Shows:
Which is why the output comes empty
Thanks
Felipe Brito
I'm using httputils2 to retrieve a remote json string.
Wierd thing is that when I retrieve it from a classic ASP page, it goes fine, but when I try to pull it from a VB.Net page, it responds an empty string. Do you know what this could be?
Classic ASP URL: http://autorizalo.inoba.com/ext/bac...imE8pjWgOD0k6&token=123456&mobile=56991296532
.NET URL: http://autorizalo.inoba.com/ext/def...imE8pjWgOD0k6&token=123456&mobile=56991296532
The code for the request is:
B4X:
Dim url As String=Main.SystemDomainEndPoint & "?FLAG=SEARCH.SHOP&lat=" & x.ReadMap("lat") & "&lon=" & x.ReadMap("lon")
Dim jobSHOP As HttpJob
'jobSHOP.GetRequest.SetHeader("user-agent","webkit")
jobSHOP.Initialize("jobSHOP", Me)
jobSHOP.PostString(url, "")
jobSHOP.GetRequest.SetHeader("user-agent","webkit")
jobSHOP.GetRequest.SetHeader("host","autorizalo.inoba.com")
The LOG Shows:
B4X:
actpager_listshopsget (B4A line: 881)
Dim Map1 As Map = JSONP.NextObject
org.json.JSONException: End of input at character 0 of
at org.json.JSONTokener.syntaxError(JSONTokener.java:450)
at org.json.JSONTokener.nextValue(JSONTokener.java:97)
at anywheresoftware.b4a.objects.collections.JSONParser.NextObject(JSONParser.java:45)
at com.autorizalo.android.actpager._listshopsget(actpager.java:1892)
at com.autorizalo.android.actpager._jobdone(actpager.java:1559)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:169)
at anywheresoftware.b4a.keywords.Common$4.run(Common.java:930)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4921)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1027)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794)
at dalvik.system.NativeStart.main(Native Method)
org.json.JSONException: End of input at character 0 of
Which is why the output comes empty
Thanks
Felipe Brito
Last edited: