Crate http_type

Source

Structs§

Enums§

  • Represents different types of HTTP content types, such as JSON, XML, plain text, HTML, form URL encoded, and an unknown type.
  • Represents different types of errors that can occur in the application.
  • Represents the HTTP version used in the request or response.
  • Defines the Methods enum, representing HTTP request methods.
  • Defines the Protocol enum, representing HTTP-related protocols.
  • Enumeration of HTTP status codes representing various HTTP response statuses

Statics§

  • The HTTP header field name Accept.
  • The value for the Accept header indicating that any content type is acceptable.
  • The HTTP header field name Accept-Encoding, used to specify acceptable content encodings.
  • The value for the Accept-Encoding header indicating br (Brotli) compression.
  • The value for the Accept-Encoding header indicating deflate compression.
  • The value for the Accept-Encoding header indicating gzip compression.
  • The value for the Accept-Encoding header indicating no encoding (identity).
  • The HTTP header field name Accept-Language, used to specify preferred languages for the response.
  • The value for the Accept-Language header indicating any language is acceptable.
  • The default value for the Accept-Language header indicating any language is acceptable.
  • The value for the Accept-Language header indicating English as the preferred language.
  • The MIME type for JSON content, typically used for requests and responses containing JSON data.
  • The MIME type for XML content, typically used for requests and responses containing XML data.
  • The HTTP header field name Authorization, used to specify authentication credentials.
  • The value for the Authorization header when using Basic authentication.
  • The value for the Authorization header indicating Bearer token authentication.
  • A line break character (newline).
  • A static byte slice representation of the string BR.
  • The HTTP header field name Cache-Control, used to specify caching directives.
  • The value for the Cache-Control header indicating no-cache.
  • The value for the Cache-Control header indicating that the response should not be cached.
  • The value for the Cache-Control header indicating that the response is cacheable by any cache.
  • A colon followed by a space (: ).
  • The byte representation of the first character in the COLON_SPACE.
  • A colon followed by a space symbol (:).
  • The HTTP header field name Connection, used to specify control options for the current connection.
  • The value for the Connection header indicating a close connection.
  • The value for the Connection header indicating keep-alive.
  • The HTTP header field name Content-Encoding, used to specify the encoding transformations applied to the response body.
  • The value for the Content-Encoding header indicating Brotli compression. The response body is compressed using the Brotli algorithm, a more modern compression algorithm.
  • The value for the Content-Encoding header indicating deflate compression. The response body is compressed using the Deflate algorithm.
  • The value for the Content-Encoding header indicating gzip compression. The response body is compressed using the Gzip algorithm.
  • The value for the Content-Encoding header indicating no encoding (identity). The response body is not compressed or encoded.
  • The value for the Content-Length header, used to specify the size of the request body in octets (8-bit bytes).
  • The HTTP header field name Content-Type, used to specify the media type of the resource or the data being sent in an HTTP request or response.
  • The value for the Content-Type header indicating CSS format.
  • The value for the Content-Type header indicating a font in OTF format.
  • The value for the Content-Type header indicating a font in TTF format.
  • The value for the Content-Type header indicating a font in WOFF format.
  • The value for the Content-Type header indicating a font in WOFF2 format.
  • The value for the Content-Type header indicating Form URL Encoded data.
  • The value for the Content-Type header indicating image GIF format.
  • The value for the Content-Type header indicating image JPEG format.
  • The value for the Content-Type header indicating image PNG format.
  • The value for the Content-Type header indicating WebP image format.
  • The value for the Content-Type header indicating JavaScript format.
  • The value for the Content-Type header indicating JSON format.
  • The value for the Content-Type header indicating Multipart Form Data.
  • The value for the Content-Type header indicating octet stream (binary data).
  • The value for the Content-Type header indicating PDF format.
  • The value for the Content-Type header indicating HTML format.
  • The value for the Content-Type header indicating plain text.
  • The value for the Content-Type header indicating XML format.
  • The HTTP header field name Cookie, used to send cookies from the server to the client.
  • The HTTP header field name Date, used to specify the date and time at which the message was sent.
  • Default host
  • Default http path
  • Default web port
  • Empty str
  • The HTTP header field name ETag, used to specify a unique identifier for a resource version.
  • The MIME type for form-encoded data, commonly used for sending data in the body of HTTP requests, especially for form submissions.
  • GET
  • Hash symbols
  • The HTTP header field name Host, used to specify the host and port number of the server.
  • A constant representing the “HTTP” protocol.
  • A constant representing the “HTTPS” protocol.
  • Http br
  • Http br bytes
  • Http doubble br
  • Http doubble br bytes
  • The default HTTP version HTTP/2 used in requests and responses.
  • The default HTTP version HTTP/1.1 used in requests and responses.
  • The HTTP header field name Last-Modified, used to specify the last modification date of the resource.
  • The HTTP header field name Location, used to specify the URL to redirect a client.
  • OK
  • OPTIONS
  • POST
  • Query symbols
  • The HTTP header field name Referer, used to specify the URL of the referring resource.
  • The HTTP header field name Set-Cookie, used to send cookies from the server to the client.
  • A single space character.
  • The byte representation of a single space character.
  • A tab character.
  • The byte representation of a tab character.
  • The MIME type for HTML content, typically used for requests and responses containing HTML data.
  • The MIME type for plain text content, typically used for requests and responses containing simple text data.
  • The HTTP header field name Transfer-Encoding, used to specify the form of encoding used to safely transfer the entity to the user.
  • The value for the Transfer-Encoding header indicating chunked transfer encoding.
  • Unknown HTTP version
  • The HTTP header field name Upgrade, used to indicate the protocol the client wants to upgrade to.
  • The HTTP header field “User-Agent”.
  • The HTTP header field name Vary, used to specify that the response may vary based on certain request headers.
  • The HTTP header field name X-Content-Type-Options, used to indicate that the browser should not sniff the MIME type of a response.
  • The value for the X-Content-Type-Options header to prevent MIME sniffing.
  • The HTTP header field name X-Frame-Options, used to specify whether a browser should be allowed to render a page in a <frame>.
  • The value for the X-Frame-Options header to prevent the page from being framed.
  • The value for the X-Frame-Options header to allow the page to be framed only by the same origin.
  • The HTTP header field name X-Powered-By, used to indicate the technology used by the server.
  • The HTTP header field name X-Requested-With, used to identify the type of request, typically for AJAX requests.
  • The value for the X-Requested-With header indicating an AJAX request.

Type Aliases§