Getting a 406 Error Code - What’s Causing It and How Do I Fix It? or Why Am I Seeing a 406 Error Code

14 Replies, 1093 Views

Hey! Had the same 406 error code issue last week. Turns out my server was super strict about content negotiation.

Try adding this to your .htaccess:
`Header set Accept "application/json, text/html"`

Also, check if your API endpoints are expecting a specific format. Sometimes the server just won’t budge unless you send EXACTLY what it wants.

For debugging, Postman (postman.com) is a lifesaver—you can tweak headers and see what sticks.

Good luck!

Messages In This Thread



Users browsing this thread: 1 Guest(s)