Reputation: 423
I am developing one React application, using the fetch API, I am sending one request along with some query parameters in the URL to server. Getting 400 bad request when the length of the characters in the URL exceeds 7700 characters in the chrome browser.
const requestOptions = {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ parametername: parametervalue})
};
fetch(URL, requestOptions)
Please help me with how to fix it.
Upvotes: 0
Views: 611
Reputation: 370
What is the maximum length of a URL in different browsers?
According to this, you can't have url that is 7000+ characters long. Consider finding a different way to implement?
Upvotes: 1