v0.0.1
Initial public release
This commit is contained in:
@@ -17,10 +17,10 @@
|
||||
You can force a specific raw output by specifying the <a href="https://www.iana.org/assignments/media-types/media-types.xhtml">MIME type</a> via
|
||||
<a href="https://www.rfc-editor.org/rfc/rfc9110.html#section-12.5.1">the <code>Accept</code> header (RFC 9110 § 12.5.1)</a>, which may be one of:
|
||||
<ul>
|
||||
<li><code>application/json</code> for <a href="https://www.rfc-editor.org/rfc/rfc8259.html">JSON</a></li>
|
||||
<li><code>application/xml</code> for <a href="https://www.rfc-editor.org/rfc/rfc7303.html">XML</a></li>
|
||||
<li><code>application/yaml</code> for <a href="https://www.rfc-editor.org/rfc/rfc9512.html">YAML</a></li>
|
||||
<li><code>text/html</code> for <a href="https://www.rfc-editor.org/rfc/rfc2854.html">HTML</a></li>
|
||||
<li><code>application/json</code> for JSON (<a href="https://www.rfc-editor.org/rfc/rfc8259.html">RFC 8259</a>, <a href="https://www.iana.org/assignments/media-types/application/json">IANA registration</a>)</li>
|
||||
<li><code>application/xml</code> for XML (<a href="https://www.rfc-editor.org/rfc/rfc7303.html">RFC 7303</a>, <a href="https://www.iana.org/assignments/media-types/application/xml">IANA registration</a>)</li>
|
||||
<li><code>application/yaml</code> for YAML (<a href="https://www.rfc-editor.org/rfc/rfc9512.html">RFC 9512</a>, <a href="https://www.iana.org/assignments/media-types/application/yaml">IANA registration</a>)</li>
|
||||
<li><code>text/html</code> for HTML (<a href="https://www.rfc-editor.org/rfc/rfc2854.html">RFC 2854</a>, <a href="https://www.iana.org/assignments/media-types/text/html">IANA registration</a>)</li>
|
||||
</ul>
|
||||
For example: <code>Accept: application/json</code> will return JSON.
|
||||
<br/>
|
||||
@@ -36,8 +36,15 @@
|
||||
|
||||
If no selectable MIME type is provided but an <code>Accept</code> was given, an error will be returned; specifically, a
|
||||
<a href="https://www.rfc-editor.org/rfc/rfc9110.html#section-15.5.7"><code>406</code> status code (RFC 9110 § 15.5.7)</a>.
|
||||
In this case, supported MIME types will be returned in the response's <code>Accept</code> header.
|
||||
<br/>
|
||||
In this case, supported MIME types will be returned in the response's <code>Accept</code> header values, e.g.:
|
||||
<p>
|
||||
<pre>
|
||||
Accept: application/json
|
||||
Accept: application/xml
|
||||
Accept: application/yaml
|
||||
Accept: text/html
|
||||
</pre>
|
||||
</p>
|
||||
|
||||
Note that <a href="https://lynx.invisible-island.net/">Lynx</a> and <a href="http://elinks.or.cz/">Elinks</a> are considered "graphical"
|
||||
browsers by this program as they are HTML-centric.
|
||||
@@ -46,7 +53,7 @@
|
||||
The following parameters control/modify behavior.<a href="#usage_params_mod">{{ $linkico }}</a>
|
||||
<ul>
|
||||
<li>
|
||||
<b>mime:</b> Specify an explicit MIME type via URL instead of the <code>Accept</code> header as specified above.
|
||||
<b><code>mime</code>:</b> Specify an explicit MIME type via URL instead of the <code>Accept</code> header as specified above.
|
||||
<ul>
|
||||
<li>This should only be used by clients in which it is impossible or particularly cumbersome to modify/specify headers.
|
||||
<code>Accept</code> is more performant.</li>
|
||||
@@ -56,7 +63,7 @@
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<b>include:</b> Include a <code><code></code> (or <code><pre></code>, depending on if indentation is needed/requested) block in the HTML for the specified MIME type as well.</li>
|
||||
<b><code>include</code>:</b> Include a <code><code></code> (or <code><pre></code>, depending on if indentation is needed/requested) block in the HTML for the specified MIME type as well.</li>
|
||||
<ul>
|
||||
<li>Only the first supported instance of this parameter will be used.</li>
|
||||
<li>
|
||||
@@ -70,7 +77,7 @@
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<b>indent:</b> Enable/specify indentation for JSON and XML output; ignored for others.
|
||||
<b><code>indent</code>:</b> Enable/specify indentation for JSON and XML output; ignored for others.
|
||||
<ul>
|
||||
<li>The default is to not indent. (Commonly referred to as "condensed" or "compressed" JSON/XML.)</li>
|
||||
<li>Only the first specified instance of this parameter will be used.</li>
|
||||
|
||||
Reference in New Issue
Block a user