Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

431 (Request Header Fields Too Large)

GET http://localhost:3000/data/posts.json 431 (Request Header Fields Too Large) I am getting an error mentioned above. I am using local server "npm server" (No Xampp or WAMP)

JSON file is downloaded from here "https://gorest.co.in/public-api/users?_format=json&access-token=UrX-V34IN7O-1TV0HEaVUCRUz65B9-ibL6M1" I have downloaded this file on the local server.

My Code is:

const API = './data/posts.json';

componentDidMount(){

        fetch(API)
        .then(response => response.text())
        .then( (data) => { console.log("data - ", data) } )
    }
like image 829
Pradeep Avatar asked Jan 07 '20 09:01

Pradeep


People also ask

How do I fix 431 request header fields too large?

Clear Your Cookies Too many cookies in the request can cause a web page to show the HTTP error 431 status instead of its content. Websites often use cookies to store preferences, give relevant content, and keep users signed in. However, clearing the browser cookies helps fix this issue.

How do I fix the request header size is too long?

The “Bad Request – Request Too Long” error is exclusive to browsers. The typical solution is to clear the cache and cookies in your browser.

How do I fix Error 431 on Chrome?

1. Clear the cache/cookies of the browser. 2. Close and re-open the browser and try again.


1 Answers

You need to delete all the saved cookies for your localhost:3000.

1-chrome settings

2-on the left menu, click on Privacy and security tab

3-go to "privacy and security" section

4-click on site settings

5-click "view permissions and data stored across sites"

6-find localhost and on the right menu reset data

like image 132
Yilmaz Avatar answered Oct 19 '22 10:10

Yilmaz