http icon indicating copy to clipboard operation
http copied to clipboard

[ERR] JSONException to make a GET request with params

Open mcasami-frit opened this issue 3 years ago • 2 comments

Describe the bug GET requests with params are returning this exception:

{message: "JSONException"}

Error: JSONException at Object.cap.fromNative (VM3:428) at :1:18

To Reproduce Steps to reproduce the behavior:

  1. I use encodeURI () to format my urls with parameters. (I have tried using the params object but the results are the same).
  2. I have created a new endpoint without parameters in its url. The petition works fine.
  3. I think it is not a problem with the response from the server. I am surprised to see a JSON error when making a GET call.

Expected behavior I would like to be able to make the call without removing the url parameters. I do not know the problem ...

Smartphone (please complete the following information):

  • Device: Xiaomi Redmi Note 8
  • OS: Android 10

mcasami-frit avatar Jul 29 '21 15:07 mcasami-frit

Could you provide a minimal reproduction repo demonstrating this issue? I'm unable to reproduce this. You may use postman-echo (e.g https://postman-echo.com/get) for the url.

emily-curry avatar Aug 27 '21 05:08 emily-curry

Describe the bug GET requests with params are returning this exception:

{message: "JSONException"}

Error: JSONException at Object.cap.fromNative (VM3:428) at :1:18

To Reproduce Steps to reproduce the behavior:

  1. I use encodeURI () to format my urls with parameters. (I have tried using the params object but the results are the same).
  2. I have created a new endpoint without parameters in its url. The petition works fine.
  3. I think it is not a problem with the response from the server. I am surprised to see a JSON error when making a GET call.

Expected behavior I would like to be able to make the call without removing the url parameters. I do not know the problem ...

Smartphone (please complete the following information):

  • Device: Xiaomi Redmi Note 8
  • OS: Android 10

I have exactly the same problem: in localhost/chrome everything works fine, on real device nothing seems to be working

image

ciccilleju avatar Oct 12 '21 18:10 ciccilleju