One advantage of GET is I can just copy the URL and share it. The article makes no mention of that. While I love the proposal (apart from the name, I can see the SEARCH verb being used for something that's not search), they should also address the URL share-ablity aspect. Something like " rel="nofollow">https://google.com/search where query can be arbitrarily large (>2000 URL length restriction) and the browser is sm…
Related, I wish there was a more standard way to include things like verb and headers in a URI. I hacked an implementation that parses /something#a:b&c:d to set the headers a and c, I was thinking for verb I could do https+get.
Defining a new HTTP method: HTTP Search (2021)
61–70 of 131 posts
Re: Defining a new HTTP method: HTTP Search (2021)
#62I'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…
A great example of this today is GraphQL. Even if you disagree with the premise of GQL, you can understand how you can have complicated filtering and sorting logic, and conditional expansion of nested resources. For a nontrivial data model, you may want to select only a minimal number of fields on each nested resource. Having lots of different variants of the same endpoint to serve the same query with different shape…
Re: Defining a new HTTP method: HTTP Search (2021)
#63No one else needed to know or care that it existed.
Re: Defining a new HTTP method: HTTP Search (2021)
#64As I said, this is totally naive. Is there some obvious reason why this is a terrible idea, or not really possible?
Re: Defining a new HTTP method: HTTP Search (2021)
#65One advantage of GET is I can just copy the URL and share it. The article makes no mention of that. While I love the proposal (apart from the name, I can see the SEARCH verb being used for something that's not search), they should also address the URL share-ablity aspect. Something like " rel="nofollow">https://google.com/search where query can be arbitrarily large (>2000 URL length restriction) and the browser is sm…
Related, I wish there was a more standard way to include things like verb and headers in a URI. I hacked an implementation that parses /something#a:b&c:d to set the headers a and c, I was thinking for verb I could do https+get.
Re: Defining a new HTTP method: HTTP Search (2021)
#66One advantage of GET is I can just copy the URL and share it. The article makes no mention of that. While I love the proposal (apart from the name, I can see the SEARCH verb being used for something that's not search), they should also address the URL share-ablity aspect. Something like " rel="nofollow">https://google.com/search where query can be arbitrarily large (>2000 URL length restriction) and the browser is sm…
Yes, that’s also lost when you do POST. Which is by design though. A HTTP Search seems like only drawbacks.
Many systems limit the length of the URL, so this is significant.
Re: Defining a new HTTP method: HTTP Search (2021)
#67One advantage of GET is I can just copy the URL and share it. The article makes no mention of that. While I love the proposal (apart from the name, I can see the SEARCH verb being used for something that's not search), they should also address the URL share-ablity aspect. Something like " rel="nofollow">https://google.com/search where query can be arbitrarily large (>2000 URL length restriction) and the browser is sm…
Re: Defining a new HTTP method: HTTP Search (2021)
#68I'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…
We actually run into the query limit problem super often where I work. User-facing search pages for very complicated data models create very complicated URLs quickly.
Re: Defining a new HTTP method: HTTP Search (2021)
#69TIL sending a POST request to a URL invalidates the cache for GET requests of the same URL. Going to have to review my REST APIs to make sure that’s not a problem.