Live data from Hacker News

RFC 10008: The new HTTP Query Method

rfc-editor.org

91–100 of 189 posts

Re: RFC 10008: The new HTTP Query Method

#91
> GET: Content (body) "no defined semantics"

I thought it wouldn't be a terrible idea to open up the GET method to contain a body but according to the original spec the GET body is to be ignored completely. There's also caching which would break because the important bit of the request would live in the stripped body.

Re: RFC 10008: The new HTTP Query Method

#93

I wonder if HTML forms will add support for QUERY: This would avoid the annoying re-submission warnings you're getting if you refresh a page that was returned by a POST form submission, since QUERY is required to be idempotent.

Supporting more than GET/POST in HTML forms has been my dream for decades. There's a WHATWG proposal to do just that if you want to add your voice: https://github.com/whatwg/html/pull/11347

Re: RFC 10008: The new HTTP Query Method

#94
post #41

I wonder if HTML forms will add support for QUERY: This would avoid the annoying re-submission warnings you're getting if you refresh a page that was returned by a POST form submission, since QUERY is required to be idempotent.

This is better solved with the post redirect get pattern.

That is the good old fashion workaround. But why is it better than a form causing an HTTP QUERY.

If we can do QUERY forms, it would be an ideal time to add JSON encoding for forms.

Re: RFC 10008: The new HTTP Query Method

#96

I wonder if HTML forms will add support for QUERY: This would avoid the annoying re-submission warnings you're getting if you refresh a page that was returned by a POST form submission, since QUERY is required to be idempotent.

Depends whether your form submission should expect side effects or not. Most forms submissions have side effects. If the effect is truly idempotent, wouldn't PUT be a better verb? That is also supposed to be idempotent.

GET and QUERY are both idempotent.

Re: RFC 10008: The new HTTP Query Method

#97
post #81

Earlier quoted context omitted.

They could be updated to not delete it, like they would require for this new method anyway.

Agree. They should not delete the body in the first place.

The HTTP standard does not define a body for GET requests. Therefore, proxy implementations will typically only copy the data from the request header when sending it off to its next destination. They don’t technically “delete” anything. This saves compute (and possibly bandwidth, if the request happened to have a body, although the whole point is that one can safely assume a GET request does not have a body per the standard).

Re: RFC 10008: The new HTTP Query Method

#99
post #77

Just allow body for get. Problem solved.

Nah, you need the 405 Method Not Allowed to be returned by legacy systems and proxies along the way to your bleeding edge server rather than silently failing whilst dropping the params in the request body.

Re: RFC 10008: The new HTTP Query Method

#100

I wonder if HTML forms will add support for QUERY: This would avoid the annoying re-submission warnings you're getting if you refresh a page that was returned by a POST form submission, since QUERY is required to be idempotent.

See https://github.com/whatwg/html/issues/12594.
Post reply on HN