http
http copied to clipboard
[ERR] JSONException to make a GET request with params
Describe the bug GET requests with params are returning this exception:
{message: "JSONException"}
Error: JSONException
at Object.cap.fromNative (VM3:428)
at
To Reproduce Steps to reproduce the behavior:
- I use encodeURI () to format my urls with parameters. (I have tried using the params object but the results are the same).
- I have created a new endpoint without parameters in its url. The petition works fine.
- 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
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.
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:
- I use encodeURI () to format my urls with parameters. (I have tried using the params object but the results are the same).
- I have created a new endpoint without parameters in its url. The petition works fine.
- 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