Wouldn’t be enough to “extend” GET so that it supports a body payload as well?
Defining a new HTTP method: HTTP Search (2021)
11–20 of 131 posts
Re: Defining a new HTTP method: HTTP Search (2021)
#12Wouldn’t be enough to “extend” GET so that it supports a body payload as well?
Re: Defining a new HTTP method: HTTP Search (2021)
#13If defining the attributes of the thing to return takes that much complexity, maybe that's a sign the endpoint is poorly designed, rather than GET query string length being insufficiently large.
Re: Defining a new HTTP method: HTTP Search (2021)
#14Re: Defining a new HTTP method: HTTP Search (2021)
#15This seems reasonable, but unlikely to happen. GET is already pretty much sufficient, especially given that clients generally support megabytes worth of query strings in these modern times. If we're doing this though, I'll cast my vote for naming it more semantically as QUERY, and forgoing whatever little WebDAV compatibility would be had otherwise.
Re: Defining a new HTTP method: HTTP Search (2021)
#16Wouldn’t be enough to “extend” GET so that it supports a body payload as well?
They support POST as a fallback.
Re: Defining a new HTTP method: HTTP Search (2021)
#17I'm trying to imagine an example of the authors primary use case: "a complicated data retrieval, sending lots of data but not changing the server state". Is he imagine sending something like a SQL statement SELECT with multiple WHERE and JOIN clauses using a recursive CTE? If defining the attributes of the thing to return takes that much complexity, maybe that's a sign the endpoint is poorly designed, rather than GET…
Re: Defining a new HTTP method: HTTP Search (2021)
#18Wouldn’t be enough to “extend” GET so that it supports a body payload as well?
It already does.
(paragraph starting “Although request message framing is independent of the method used”)
Re: Defining a new HTTP method: HTTP Search (2021)
#19So, GET URLs with base64 encoded data is definitely ugly, but at least you can save them and share them easily.
Re: Defining a new HTTP method: HTTP Search (2021)
#20Or just use GET since it already works. I don't see any problems with large query params. You can also split the search into a POST request and a GET request for the result.
> I don't see any problems with large query params. Most servers will reject URLs after a certain size, 4-8KB.