Hi,
So I'm trying to perform a GET request but I keep getting the error below. It seems to be complaining about the first "{" brace. The GET request expects the URL with parameters in the form of e.g www.url.com/{"name": "Home Alone 3"} which then deletes the row with name "Home Alone 3". Works just fine via desktop so I assume my code is wrong.
"
java.lang.IllegalArgumentException: Illegal character in path at index 86: http://xxx.xxx.xxx.xxx:xxxx/reedhousesystems-its-africa-web/service/art/remove-product/{"name":"Number 9"}
** Activity (main) Create, isFirst = true **
main_remprodontw (B4A line: 134)
remProdJob.InitializeGet(remProdUrl)
java.lang.IllegalArgumentException: Illegal character in path at index 86: http://xxx.xxx.xx.xxx:xxxx/reedhousesystems-its-africa-web/service/art/remove-product/{"name":"Number 9"}
at java.net.URI.create(URI.java:776)
at org.apache.http.client.methods.HttpGet.<init>(HttpGet.java:75)
at anywheresoftware.b4a.http.HttpClientWrapper$HttpUriRequestWrapper.InitializeGet(HttpClientWrapper.java:306)
at com.exg.send2me.main._remprodontw(main.java:707)
at com.exg.send2me.main._activity_create(main.java:269)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:169)
at com.exg.send2me.main.afterFirstLayout(main.java:89)
at com.exg.send2me.main.access$100(main.java:16)
at com.exg.send2me.main$WaitForLayout.run(main.java:74)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:3683)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)"
So I'm trying to perform a GET request but I keep getting the error below. It seems to be complaining about the first "{" brace. The GET request expects the URL with parameters in the form of e.g www.url.com/{"name": "Home Alone 3"} which then deletes the row with name "Home Alone 3". Works just fine via desktop so I assume my code is wrong.
"
java.lang.IllegalArgumentException: Illegal character in path at index 86: http://xxx.xxx.xxx.xxx:xxxx/reedhousesystems-its-africa-web/service/art/remove-product/{"name":"Number 9"}
** Activity (main) Create, isFirst = true **
main_remprodontw (B4A line: 134)
remProdJob.InitializeGet(remProdUrl)
java.lang.IllegalArgumentException: Illegal character in path at index 86: http://xxx.xxx.xx.xxx:xxxx/reedhousesystems-its-africa-web/service/art/remove-product/{"name":"Number 9"}
at java.net.URI.create(URI.java:776)
at org.apache.http.client.methods.HttpGet.<init>(HttpGet.java:75)
at anywheresoftware.b4a.http.HttpClientWrapper$HttpUriRequestWrapper.InitializeGet(HttpClientWrapper.java:306)
at com.exg.send2me.main._remprodontw(main.java:707)
at com.exg.send2me.main._activity_create(main.java:269)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:169)
at com.exg.send2me.main.afterFirstLayout(main.java:89)
at com.exg.send2me.main.access$100(main.java:16)
at com.exg.send2me.main$WaitForLayout.run(main.java:74)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:3683)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)"
Attachments
Last edited: