News for hackers. Stuff that matters.
Re:The HTTP Query Method by cortesoft on Saturday November 29, 2025 @10:14PM (#46093279)
It would be pretty impossible to actually ‘enforce’ that GETs don’t modify state. I am not sure if I would call the lack of enforcement a problem when it is more a simple fact about distributed systems; no specification can enforce what a service does outside of the what is returned in a response.
Re:The HTTP Query Method by Veserv on Saturday November 29, 2025 @11:20PM (#46093687)
That is exactly my point. There is no reason to syntactically distinguish what is semantically non-distinguishable.

The interpretation of a request is up to the server. There is no reason for the client to syntactically distinguish that the request body is for a POST vs QUERY; the request parameters and response have the same shape with the same serialization format.

However, on the other side, a server does control interpretation, so it is responsible for documenting and enforcing how it will interpret. QUERY semantics vs generic POST semantics is a receive/server-side decision and thus should not be a syntactic element of client requests, merely a server description of endpoint semantics (“QUERY endpoint” meaning shorthand for POST endpoint with query semantics).

edit: Thinking about it some more, there is one possible semantic difference which is that a transparent caching layer could use a syntactically different POST (i.e. QUERY) to know it should be allowed to cache the request-response. I do not know enough about caching layers to know how exactly they make fill/eviction choices to know if that is important.

Re:The HTTP Query Method by cortesoft on Sunday November 30, 2025 @02:44PM (#46099729)
> There is no reason to syntactically distinguish what is semantically non-distinguishable.

The point is to have a standard, so you can more easily learn what an API is doing instead of having to start from scratch every time.