Skip to content

Commit

Permalink
Address #677
Browse files Browse the repository at this point in the history
Added an Accept-Profile header to the example for the use of HTTP OPTIONS
and added some text clarifying that Accept-Profile in an OPTIONS response is for the case when a server accepts PUT, POST or PATCH for a resource
Addresses #677
  • Loading branch information
larsgsvensson committed Feb 14, 2019
1 parent 9491548 commit 6a820b8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions conneg-by-ap/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,13 @@ <h4>Using <code>HTTP OPTIONS</code></h4>
In this case a server implementing content negotiation by profile
SHOULD return a <code>Content-Profile</code> header
listing all profiles the requested resource conforms to.
If the server accepts HTTP <code>PUT</code>, <code>POST</code> or <code>PATCH</code>
commands against the specified resource,
it also SHOULD also return a <code>Accept-Profile</code> header
specifying which profiles are acceptable when sending data
to that resource.
Both the <code>Accept-Profile</code> and the <code>Content-Profile</code> headers
MAY specify q-values for each profile.
</p>
<pre class="example nohighlight" title="Using HTTP OPTIONS to list available profiles" aria-busy="false" aria-live="polite">
OPTIONS /some/resource HTTP/1.1
Expand All @@ -367,6 +374,7 @@ <h4>Using <code>HTTP OPTIONS</code></h4>

HTTP/1.1 200 OK
Content-Profile: urn:example:profile:1;q=0.8,http://example.org/profiles/2;q=0.5
Accept-Profile: urn:example:profile:1;q=0.8,http://example.org/profiles/2;q=0.5
[More headers for this resource]
</pre>
</section>
Expand Down

0 comments on commit 6a820b8

Please sign in to comment.