HTTP GET Bad Request

I hope this will be a time saver for some of you.

The Mozilla documentation (MDN Web Docs) defines HTTP response 400 Bad Request as such:

The HyperText Transfer Protocol (HTTP) 400 Bad Request response status code indicates that the server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).

Which is obviously the right definition but it may be a little vague. Practically speaking, this might mean that you’re trying to send a payload (body) to the server using a GET request.

This is technically not forbidden by the HTTP specification but some servers throw a Bad Request response when receiving a body within a GET request, so if you need to send the server some payload please consider using a POST request instead.

 
1
Kudos
 
1
Kudos

Now read this

Quarantine tip #1: stop checking your phone

I get it: the world is in lockdown, you’ve probably been sheltering in place for more than a month now and the only way to get in touch with your family and friends is through your phone or your tablet/pc. In times like these it’s... Continue →