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

Interviewing is hard

Interviewing people for technical positions is hard, we all know that. In fact, I’ve been knowing that for some time, mainly because I was reading about it in various blogs. What I didn’t realize was how much difficult it was until I had... Continue →