Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<!DOCTYPE html> | ||
<html lang="en" dir="ltr" | ||
xmlns="http://www.w3.org/1999/xhtml" | ||
xmlns:w="tag:fullstack.wiki,2018:ns/" | ||
xmlns:xht="http://www.w3.org/1999/xhtml/vocab#" | ||
> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<title>PATCH</title> | ||
<meta name="description" content="PATCH modifies the target resource according to the given instructions" /> | ||
<link rel="up" href="index.xml" /> | ||
</head> | ||
<body> | ||
<main about="tag:fullstack.wiki,2018:ns/http/methods/PATCH" typeof="w:HTTP-Method"> | ||
<a rel="http://www.w3.org/1999/xhtml/vocab#describedby" href="" /> | ||
|
||
<h1>PATCH</h1> | ||
<p>The PATCH allows a client to modify a resource according to provided instructions. This can include a applying a diff.</p> | ||
|
||
<h2>Writing requests (clients)</h2> | ||
<p>If a client wants to modify a specific part of a resource without overwriting the entire document, it should use the PATCH method with a media type that can express the desired change; if this is available on the server.</p> | ||
<p>If applicable, send the request with a <a href="../conditional.xml">conditional test (e.g. If-Match)</a>, to avoid creating the resource in the event it does not exist.</p> | ||
<p>Check the error code and follow the error recovery process, <a href="../status-codes/405.xml">405 (Method Not Allowed)</a>, <a href="../status-codes/415.xml">415 (Unsupported Media Type)</a>, or <a href="../status-codes/501.xml">501 (Not Implemented)</a> may require that the request be retried with an equivelant PUT request.</p> | ||
|
||
<h2>Reading requests (servers)</h2> | ||
<p>Servers that use <a href="../status-codes/428.xml">428 (Precondition Required)</a> should judge if the patch media-type has sufficient information to avoid lost updates. If the patch can only be applied if the document is in an expected state, then the server should not require a precondition header, since this would be redundant.</p> | ||
<p>Check the <a href="../preferences/return.xml">"return"</a> preference for guidence on what response should be generated. By default, return a short document summarizing the changes made.</p> | ||
|
||
<h2>Overview table</h2> | ||
<dl class="inline"> | ||
<dt>Name</dt> | ||
<dd property="w:HTTP-Method-name">PATCH</dd> | ||
<dt>Description</dt> | ||
<dd property="w:HTTP-Method-description">Modifies the target resource according to the given instructions.</dd> | ||
<dt>Specification</dt> | ||
<dd property="w:specification"><a href="https://httpwg.org/specs/rfc5789.html">RFC 5789: PATCH Method for HTTP</a></dd> | ||
</dl> | ||
</main> | ||
</body> | ||
</html> |