-
Notifications
You must be signed in to change notification settings - Fork 0
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
Provide individual update of items in a resource #37
Comments
The issue is of PATCH vs PUT. Need to talk to the front end team if they need both. For making the API future-proof both PATCH and PUT should be included. |
I think PUT is definitely easier and safer to use based on looking at a few things, but I'm not too sure the difference exactly. Is patch just faster? I thought PUT also grabs the file and looks for differences there too? |
No. PUT changes each and every data member of the resource. In a sense, you're recreating that resource. PUT url/to/the/resource/A While PATCH would look something like this |
PUT is not supposed to look for changes. That's how the PUT defination is defined (although you decide how you want to implement the PUT) |
hmmm alright, I guess that could be good especially for json. For xml(which we probably aren't using anyways) that looks like it could be a mess haha. If you want to implement PATCH, go ahead if you have other blockers currently. But if you don't I don't think it's a huge deal. |
Nope. We ain't using xml. That's old tech man haha. What do you mean by blockers lol? |
And I think having PATCH really makes the API future proof! |
blockers as in things stopping you from doing other things. So if you have time to do it, go ahead and add it. But if there are higher priority thigns on the list, finish those first. |
Currently, PUT for all of the resources require all the member fields of the resources to be sent in the request. This might be problematic while API consumption also might make the update faster.
Fix it so that only member fields that need to be changed are required to be sent through the request. Or at least reduce the number of update statements by checking if the field is changed from previous value or not.
The text was updated successfully, but these errors were encountered: