PATCH method
Below is an example of how to use PATCH and over come ambiguity of identifying which fields need to be modified vs those that don't.
PATCH /path/myAPI
{"key":"FieldName","Value":"someValue"}
There is a very good article from William Durand please-do-not-patch-like-an-idiot. He goes further in its use to specify various operations that can be achieved with the PATCH method. Which addresses the common design problem in a PATCH call, differentiating a request value to be set to null as opposed to using null to retain its current state.
Below is an example of how to use PATCH and over come ambiguity of identifying which fields need to be modified vs those that don't.
PATCH /path/myAPI
{"key":"FieldName","Value":"someValue"}
There is a very good article from William Durand please-do-not-patch-like-an-idiot. He goes further in its use to specify various operations that can be achieved with the PATCH method. Which addresses the common design problem in a PATCH call, differentiating a request value to be set to null as opposed to using null to retain its current state.
No comments:
Post a Comment