News for hackers. Stuff that matters.
Re:Defining a new HTTP method: HTTP SEARCH by SahAssar on Saturday April 17, 2021 @07:44AM (#26843524)
https://tools.ietf.org/html/rfc7231#section-4.3.1 says:

> A payload within a GET request message has no defined semantics; sending a payload body on a GET request might cause some existing implementations to reject the request.

So it's non-non-standard but not standard either. If I understand correctly a GET with body is about as defined as a POST with body, but since it is not often used the real world support is worse. What is a lot better specified about POST is response codes, like 201 Created and (I'm guessing) content negotiation.

Browsers seem pretty strict about it though, `fetch('/', {body: ''})` gives a TypeError for me but `fetch('/', {body: '', method: 'POST'})` does not.

There are no comments on this comment yet.