0

I'm using Fetch API to make an http GET request which includes a long query string.

It works fine with a query string that 2,176 characters long but doesn't work with the query string that 3,898 characters long

Tried the same request with Postman and browser which both work correctly

const response = await fetch(
          `${apiUrl}/auth/decrypt_token?token=${encodeURIComponent(
            token
          )}`
   );  

I expected the request return 200 code or at least some error code. However only get the fetch: empty response error

1 Answer 1

2

While there is no hard limit in terms of what's allowed in a query string, in practice you are going to get problems with urls over about 2000 characters.

There's no reasonable fix for this. You will have to find a different way to transmit the data.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.