{{- /*gotype: r00t2.io/clientinfo/server.Page*/ -}} {{- define "usage" }} {{- $page := . -}} {{- $linkico := "🔗" }} {{- template "meta.top" $page }}

Usage

Parameters{{ $linkico }}

You can control how the main page displays/renders. By default, it will try to "guess" what you want; e.g. if you access it in Chrome, it will return HTML but if you fetch via Curl, you'll get raw JSON (or your specified data format; see below). If the classification of client can't be determined and an Accept wasn't specified, a fallback to text-mode (by default application/json) will be returned.
You can force a specific raw output by specifying the MIME type via the Accept header (RFC 9110 § 12.5.1), which may be one of:

For example: Accept: application/json will return JSON.
If unspecified and it is a text-mode client (e.g. Curl), the default is application/json. text/html may be used to force an HTML response from a text-only client, just as one of the application/* MIME types above may be used to force that "raw" text MIME type for a "graphical" browser client. The specification as defined by RFC 9110 § 12.5.1 is completely valid to pass and will be parsed without error (provided the header value is RFC-compliant and IANA-compliant), though note that application/xml and text/html's charset parameter will be entirely ignored; the returned XML/HTML is always Unicode (with UTF-8 encoding).
If no selectable MIME type is provided but an Accept was given, an error will be returned; specifically, a 406 status code (RFC 9110 § 15.5.7). In this case, supported MIME types will be returned in the response's Accept header values, e.g.:

Accept: application/json
Accept: application/xml
Accept: application/yaml
Accept: text/html
						

Note that Links, Lynx, Elinks, and W3M are considered "graphical" browsers by this program as they are HTML-centric.

The following parameters control/modify behavior.{{ $linkico }}

{{- template "meta.bottom" $page }} {{- end }}