Java源码示例:retrofit.http.PATCH
示例1
@Headers("Accept: application/json")
@PATCH("/notifications/viewed")
Observable<ResponseBody> patchNotifications();
示例2
/**
* Appends new content to an existing page
* specified by page id
*
* Note: This passes a blank Accept-Encoding header to
* work around a known issue with the PATCH on this OneNote API
*
* @param encoding
* @param version
* @param pageId
* @param body
* @param callback
*/
@PATCH("/{version}/me/notes/pages/{pageId}/content")
void patchPage(
@Header("Accept-Encoding") String encoding,
@Path("version") String version,
@Path("pageId") String pageId,
@Body TypedString body,
Callback<Envelope<Page>> callback
);
示例3
/**
* Performs a request to update the card.
*
* @param cardId The id of the card.
* @param updateFields The fields to update.
* @param callback A callback to receive the request information.
*/
@PATCH("/v0/me/cards/{cardId}")
void update(@Path("cardId") String cardId, @Body HashMap<String, Object> updateFields, Callback<Card> callback);
示例4
/**
* Performs a request to update the user values.
*
* @param field An {@link HashMap<String, Object>} with the user field to change and the value.
* @param callback A callback to receive the request information.
*/
@PATCH("/v0/me")
void updateUser(@Body HashMap<String, Object> field, Callback<User> callback);