What about fetching many objects or creating many objects or updating many objects?
Edit: I was wrong. It's allowed to put a body in a GET request, but it isn't OK to use it according to the HTTP spec (which admittedly kind of weird). Source: https://stackoverflow.com/a/983458
Edit2: according to an edit int the SO response, it looks like I wasn't actually wrong: or at least not since 2014 when these RFCs[1][2] became the standard for HTTP.
[1]: https://tools.ietf.org/html/rfc7231#section-4.3.1 [2]: https://tools.ietf.org/html/rfc7230#section-3.3
However, it is semantic nonsense to put it on a DELETE or GET.
DELETE is defined to remove the resource identified by the URL; GET is defined to fetch the resource identified by the URL. There no purpose for an entity.
[1]: https://tools.ietf.org/html/rfc2616#section-9.3 [2]: https://tools.ietf.org/html/rfc7231#section-4.3.1
> A payload within a GET request message has no defined semantics
> The GET method means retrieve whatever information (in the form of an entity) is identified by the Request-URI.
To :
> A payload within a GET request message has no defined semantics
Which, to me, sounds like: “it was forbidden to put info in the body, and now it's just not especially encouraged”. But maybe I'm over thinking the whole thing.
If your ids are UUIDs, each has a length of 36. If your URL consisted of nothing but UUIDs, you could safely delete 55.5(repeating) of them.
[0]: https://stackoverflow.com/questions/417142/what-is-the-maxim...
Probably in violation of some standard, but seems sensible enough.
Was recently dealing with a list of 100+ simple text fields each with unique identifying meta info.
Most usage of the form would only involve updating a few at a time, but on initial entry or a large update all of them could be updated or deleted.
A RESTful approach would have me submit 100+ individual PUT requests. However for a smaller instance of our server it would likely be affected by 100s of requests at a time and it would significantly complicate the client code to make all of these requests at a time and do the error handling for it.
It’s actually a small payload, even with 100 items, so it’s ridiculous to send them individual in order to be “correct” if it
- leads to a worse user experience. - increases load on the server. - complicates the codebase.
With HTTP2 you can send a ton of requests in parallel.
For one, having it be transactional.
>With HTTP2 you can send a ton of requests in parallel.
That's orthogonal. And they still have a cost (in time and size of transfer).
That means your CDN, your load balancers, and finally your actual applications-- any any other intermediaries -- all communicating via HTTP/2.
Not to say that HTTP/2 isn't the solution, but it's going to be slower than looking up "number of sites using HTTP/2", since you can't easily inspect the behavior of the intermediary servers.
I'm not entirely sure what you mean with downstream, but in my experience H2 is really well supported almost everywhere these days. Ymmv ofc
Anyway, I'm curious... what components do you run into that don't support this yet? At least in your examples I can't think of any major players that don't do HTTP/2 out of the box, except, well, old versions.
Is this more of a hypothetical? In my experience HTTP/2 is pretty much ubiquitous for anything current.
I think though that most operations don't need this. It's not an optimization I would blindly add to any operation, unless there's a specific case that warrants it.
I don't think that this is an anti-pattern. Most APIs do '1 thing at a time'.
https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteOb...
Instead of polluting existing method names to mean new things, HTTP could offer more method names.
Having POST alternatively mean "send a command" makes it meaningless. The command could do anything.