Closed ronag closed 5 years ago
No, this is not allowed and also should not be, at least in my opinion. The server will not have allocated the necessary resources to accept an upload and therefore will not be able to fulfill your request. Or am I misunderstanding you here?
@Acconut: I'm cool with that. Though maybe we should add it to the spec? Because the HTTP spec does not enforce that invariant.
Yes, we can add this to the spec. However, I am unsure about how to formulate that because following thing just came to my mind: If you are not using the Creation extension (which is totally optional), there will never be a POST request from the client. In this case you will have proprietary server extension which handles the upload creation in another way (maybe through another API). Then the client will send the usual PATCH requests to the upload URL without ever having sent a POST request.
This setup is not very common but does occur, e.g. in the Vimeo API.
Should PATCH be allowed before POST with id? e.g.