-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resumable Uploads: POST for appending data? #2962
Comments
I'd rather not do both. Avoiding creating a media type has the positive of saving some effort. I tried to trace back the history of using PATCH in the first place and could not find a good answer. Does anyone have one? |
I believe that @reschke suggested using PATCH and defining a new media type initially. Personally I don't have a preference, either. |
On 26.11.2024 04:48, Guoye Zhang wrote:
I believe that @reschke suggested using PATCH and defining a new media type initially.
Personally I don't have a preference, either.
I'm not sure I did, but yes, that seems to be the right thing to do.
Best regards, Julian
|
Right, if we're going to use PATCH, the media type should describe how to handle the request content in a generic way. E.g., That implies that it might be good to do so in a separate document, so it can be reused by other applications, rather than being perceived as specific to resumable uploads. If that's thought of as too much work, POST is probably the right answer (with the semantics being defined by the specific resource type that's being baked into the resumable uploads spec). But how could you resist creating a media type with a name like that? |
If its worth doing, it's worth doing right |
But also, didn't we have some of this discussion in the WG wrt https://datatracker.ietf.org/doc/draft-ietf-httpapi-patch-byterange/ |
@LPardue We did. Both on the mailing list and on Github. #2501 (byte range patch discussions) https://mailarchive.ietf.org/arch/msg/httpbisa/UXTmMZaDNgtkMyA7broHeKL6vhg/ (contains discussions on POST vs PATCH) https://mailarchive.ietf.org/arch/msg/httpbisa/aAfI1cZZDHnqhykFx4DoFClFocw/ (content type of PATCH and discussions if we can use it at all) |
The current draft (-05) intents to define the |
If it's spec-specific, that's good enough, I think. |
In https://mailarchive.ietf.org/arch/msg/httpbisa/m-iXTJQGdb8XpxGjZWxXGj6Siic/, Roy Fielding suggests POST to be used instead of PATCH + application/octet-stream for appending data to an upload resource:
Since we define the upload resource in the first place, we can also specify the meaning of a POST request against it and don't have to use PATCH with a custom media type to define the message's semantics.
Personally, I think both methods (POST or PATCH) are fine. What do others think about this?
The text was updated successfully, but these errors were encountered: