12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- <refentry id="refstatus">
- <refmeta>
- <refentrytitle>ne_status</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname id="ne_status">ne_status</refname>
- <refpurpose>HTTP status structure</refpurpose>
- </refnamediv>
-
- <refsynopsisdiv>
-
- <funcsynopsis><funcsynopsisinfo>#include <ne_utils.h>
- typedef struct {
- int major_version;
- int minor_version;
- int code;
- int klass;
- char *reason_phrase;
- } <type>ne_status</type>;</funcsynopsisinfo></funcsynopsis>
-
- </refsynopsisdiv>
- <refsect1>
- <title>Description</title>
- <para>The <type>ne_status</type> type represents an HTTP
- response status; used in response messages giving a result of
- request. The <structfield>major_version</structfield> and
- <structfield>minor_version</structfield> fields give the
- protocol version supported by the server issuing the response.
- The <structfield>code</structfield> field gives the status
- code of the result (lying between <literal>100</literal> and
- <literal>599</literal> inclusive), and the
- <structfield>klass</structfield> field gives the class, which
- is equal to the most significant digit of the status. The
- <structfield>reason_phrase</structfield> field gives a
- human-readable string describing the status, which is purely
- informational (and optional) - any interpretation of the
- response status must be done using the
- <structfield>klass</structfield> and/or
- <structfield>code</structfield> fields.</para>
- <para>There are five classes of response status code defined
- for HTTP/1.1 (see <ulink
- url="https://www.rfc-editor.org/rfc/rfc9110#name-status-codes">RFC
- 9110 ẞ15</ulink>):</para>
-
- <variablelist>
- <varlistentry>
- <term><literal>1xx</literal></term>
- <listitem><simpara>Informational response.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>2xx</literal></term>
- <listitem><simpara>Success: the operation was successful</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>3xx</literal></term>
- <listitem><simpara>Redirection</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>4xx</literal></term> <listitem><simpara>Client
- error: the request made was incorrect in some
- manner.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>5xx</literal></term>
- <listitem><simpara>Server error</simpara></listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1> <title>Notes</title> <para>The
- <structfield>klass</structfield> field is named
- <quote>klass</quote> not <quote>class</quote> so that the header
- can be used from a C++ program, in which <quote>class</quote> is
- a reserved word.</para></refsect1>
- <refsect1> <title>See also</title> <para><xref
- linkend="ne_get_status"/>.</para> </refsect1>
- </refentry>
|