mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-01-25 12:44:07 +01:00
110 lines
36 KiB
HTML
110 lines
36 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="HTTP header types"><title>http::header - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-ac92e1bbe349e143.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="http" data-themes="" data-resource-suffix="" data-rustdoc-version="1.76.0 (07dca489a 2024-02-04)" data-channel="1.76.0" data-search-js="search-2b6ce74ff89ae146.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-f2adc0d6ca4d09fb.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-305769736d49e732.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-feafe1bb7466e4bd.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../http/index.html">http</a><span class="version">0.2.9</span></h2></div><h2 class="location"><a href="#">Module header</a></h2><div class="sidebar-elems"><section><ul class="block"><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#constants">Constants</a></li><li><a href="#traits">Traits</a></li></ul></section><h2><a href="../index.html">In crate http</a></h2></div></nav><div class="sidebar-resizer"></div>
|
||
<main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../http/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Module <a href="../index.html">http</a>::<wbr><a class="mod" href="#">header</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/http/header/mod.rs.html#1-174">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>HTTP header types</p>
|
||
<p>The module provides <a href="struct.HeaderName.html"><code>HeaderName</code></a>, <a href="struct.HeaderMap.html"><code>HeaderMap</code></a>, and a number of types
|
||
used for interacting with <code>HeaderMap</code>. These types allow representing both
|
||
HTTP/1 and HTTP/2 headers.</p>
|
||
<h2 id="headername"><a href="#headername"><code>HeaderName</code></a></h2>
|
||
<p>The <code>HeaderName</code> type represents both standard header names as well as
|
||
custom header names. The type handles the case insensitive nature of header
|
||
names and is used as the key portion of <code>HeaderMap</code>. Header names are
|
||
normalized to lower case. In other words, when creating a <code>HeaderName</code> with
|
||
a string, even if upper case characters are included, when getting a string
|
||
representation of the <code>HeaderName</code>, it will be all lower case. This allows
|
||
for faster <code>HeaderMap</code> comparison operations.</p>
|
||
<p>The internal representation is optimized to efficiently handle the cases
|
||
most commonly encountered when working with HTTP. Standard header names are
|
||
special cased and are represented internally as an enum. Short custom
|
||
headers will be stored directly in the <code>HeaderName</code> struct and will not
|
||
incur any allocation overhead, however longer strings will require an
|
||
allocation for storage.</p>
|
||
<h3 id="limitations"><a href="#limitations">Limitations</a></h3>
|
||
<p><code>HeaderName</code> has a max length of 32,768 for header names. Attempting to
|
||
parse longer names will result in a panic.</p>
|
||
<h2 id="headermap"><a href="#headermap"><code>HeaderMap</code></a></h2>
|
||
<p><code>HeaderMap</code> is a map structure of header names highly optimized for use
|
||
cases common with HTTP. It is a <a href="https://en.wikipedia.org/wiki/Multimap">multimap</a> structure, where each header name
|
||
may have multiple associated header values. Given this, some of the APIs
|
||
diverge from <a href="https://doc.rust-lang.org/std/collections/struct.HashMap.html"><code>HashMap</code></a>.</p>
|
||
<h3 id="overview"><a href="#overview">Overview</a></h3>
|
||
<p>Just like <code>HashMap</code> in Rust’s stdlib, <code>HeaderMap</code> is based on <a href="https://en.wikipedia.org/wiki/Hash_table#Robin_Hood_hashing">Robin Hood
|
||
hashing</a>. This algorithm tends to reduce the worst case search times in the
|
||
table and enables high load factors without seriously affecting performance.
|
||
Internally, keys and values are stored in vectors. As such, each insertion
|
||
will not incur allocation overhead. However, once the underlying vector
|
||
storage is full, a larger vector must be allocated and all values copied.</p>
|
||
<h3 id="deterministic-ordering"><a href="#deterministic-ordering">Deterministic ordering</a></h3>
|
||
<p>Unlike Rust’s <code>HashMap</code>, values in <code>HeaderMap</code> are deterministically
|
||
ordered. Roughly, values are ordered by insertion. This means that a
|
||
function that deterministically operates on a header map can rely on the
|
||
iteration order to remain consistent across processes and platforms.</p>
|
||
<h3 id="adaptive-hashing"><a href="#adaptive-hashing">Adaptive hashing</a></h3>
|
||
<p><code>HeaderMap</code> uses an adaptive hashing strategy in order to efficiently handle
|
||
most common cases. All standard headers have statically computed hash values
|
||
which removes the need to perform any hashing of these headers at runtime.
|
||
The default hash function emphasizes performance over robustness. However,
|
||
<code>HeaderMap</code> detects high collision rates and switches to a secure hash
|
||
function in those events. The threshold is set such that only denial of
|
||
service attacks should trigger it.</p>
|
||
<h3 id="limitations-1"><a href="#limitations-1">Limitations</a></h3>
|
||
<p><code>HeaderMap</code> can store a maximum of 32,768 headers (header name / value
|
||
pairs). Attempting to insert more will result in a panic.</p>
|
||
</div></details><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.Drain.html" title="struct http::header::Drain">Drain</a></div><div class="desc docblock-short">A drain iterator for <code>HeaderMap</code>.</div></li><li><div class="item-name"><a class="struct" href="struct.GetAll.html" title="struct http::header::GetAll">GetAll</a></div><div class="desc docblock-short">A view to all values stored in a single entry.</div></li><li><div class="item-name"><a class="struct" href="struct.HeaderMap.html" title="struct http::header::HeaderMap">HeaderMap</a></div><div class="desc docblock-short">A set of HTTP headers</div></li><li><div class="item-name"><a class="struct" href="struct.HeaderName.html" title="struct http::header::HeaderName">HeaderName</a></div><div class="desc docblock-short">Represents an HTTP header field name</div></li><li><div class="item-name"><a class="struct" href="struct.HeaderValue.html" title="struct http::header::HeaderValue">HeaderValue</a></div><div class="desc docblock-short">Represents an HTTP header field value.</div></li><li><div class="item-name"><a class="struct" href="struct.IntoIter.html" title="struct http::header::IntoIter">IntoIter</a></div><div class="desc docblock-short">An owning iterator over the entries of a <code>HeaderMap</code>.</div></li><li><div class="item-name"><a class="struct" href="struct.InvalidHeaderName.html" title="struct http::header::InvalidHeaderName">InvalidHeaderName</a></div><div class="desc docblock-short">A possible error when converting a <code>HeaderName</code> from another type.</div></li><li><div class="item-name"><a class="struct" href="struct.InvalidHeaderValue.html" title="struct http::header::InvalidHeaderValue">InvalidHeaderValue</a></div><div class="desc docblock-short">A possible error when converting a <code>HeaderValue</code> from a string or byte
|
||
slice.</div></li><li><div class="item-name"><a class="struct" href="struct.Iter.html" title="struct http::header::Iter">Iter</a></div><div class="desc docblock-short"><code>HeaderMap</code> entry iterator.</div></li><li><div class="item-name"><a class="struct" href="struct.IterMut.html" title="struct http::header::IterMut">IterMut</a></div><div class="desc docblock-short"><code>HeaderMap</code> mutable entry iterator</div></li><li><div class="item-name"><a class="struct" href="struct.Keys.html" title="struct http::header::Keys">Keys</a></div><div class="desc docblock-short">An iterator over <code>HeaderMap</code> keys.</div></li><li><div class="item-name"><a class="struct" href="struct.OccupiedEntry.html" title="struct http::header::OccupiedEntry">OccupiedEntry</a></div><div class="desc docblock-short">A view into a single occupied location in a <code>HeaderMap</code>.</div></li><li><div class="item-name"><a class="struct" href="struct.ToStrError.html" title="struct http::header::ToStrError">ToStrError</a></div><div class="desc docblock-short">A possible error when converting a <code>HeaderValue</code> to a string representation.</div></li><li><div class="item-name"><a class="struct" href="struct.VacantEntry.html" title="struct http::header::VacantEntry">VacantEntry</a></div><div class="desc docblock-short">A view into a single empty location in a <code>HeaderMap</code>.</div></li><li><div class="item-name"><a class="struct" href="struct.ValueDrain.html" title="struct http::header::ValueDrain">ValueDrain</a></div><div class="desc docblock-short">An drain iterator of all values associated with a single header name.</div></li><li><div class="item-name"><a class="struct" href="struct.ValueIter.html" title="struct http::header::ValueIter">ValueIter</a></div><div class="desc docblock-short">An iterator of all values associated with a single header name.</div></li><li><div class="item-name"><a class="struct" href="struct.ValueIterMut.html" title="struct http::header::ValueIterMut">ValueIterMut</a></div><div class="desc docblock-short">A mutable iterator of all values associated with a single header name.</div></li><li><div class="item-name"><a class="struct" href="struct.Values.html" title="struct http::header::Values">Values</a></div><div class="desc docblock-short"><code>HeaderMap</code> value iterator.</div></li><li><div class="item-name"><a class="struct" href="struct.ValuesMut.html" title="struct http::header::ValuesMut">ValuesMut</a></div><div class="desc docblock-short"><code>HeaderMap</code> mutable value iterator</div></li></ul><h2 id="enums" class="section-header"><a href="#enums">Enums</a></h2><ul class="item-table"><li><div class="item-name"><a class="enum" href="enum.Entry.html" title="enum http::header::Entry">Entry</a></div><div class="desc docblock-short">A view into a single location in a <code>HeaderMap</code>, which may be vacant or occupied.</div></li></ul><h2 id="constants" class="section-header"><a href="#constants">Constants</a></h2><ul class="item-table"><li><div class="item-name"><a class="constant" href="constant.ACCEPT.html" title="constant http::header::ACCEPT">ACCEPT</a></div><div class="desc docblock-short">Advertises which content types the client is able to understand.</div></li><li><div class="item-name"><a class="constant" href="constant.ACCEPT_CHARSET.html" title="constant http::header::ACCEPT_CHARSET">ACCEPT_CHARSET</a></div><div class="desc docblock-short">Advertises which character set the client is able to understand.</div></li><li><div class="item-name"><a class="constant" href="constant.ACCEPT_ENCODING.html" title="constant http::header::ACCEPT_ENCODING">ACCEPT_ENCODING</a></div><div class="desc docblock-short">Advertises which content encoding the client is able to understand.</div></li><li><div class="item-name"><a class="constant" href="constant.ACCEPT_LANGUAGE.html" title="constant http::header::ACCEPT_LANGUAGE">ACCEPT_LANGUAGE</a></div><div class="desc docblock-short">Advertises which languages the client is able to understand.</div></li><li><div class="item-name"><a class="constant" href="constant.ACCEPT_RANGES.html" title="constant http::header::ACCEPT_RANGES">ACCEPT_RANGES</a></div><div class="desc docblock-short">Marker used by the server to advertise partial request support.</div></li><li><div class="item-name"><a class="constant" href="constant.ACCESS_CONTROL_ALLOW_CREDENTIALS.html" title="constant http::header::ACCESS_CONTROL_ALLOW_CREDENTIALS">ACCESS_CONTROL_ALLOW_CREDENTIALS</a></div><div class="desc docblock-short">Preflight response indicating if the response to the request can be
|
||
exposed to the page.</div></li><li><div class="item-name"><a class="constant" href="constant.ACCESS_CONTROL_ALLOW_HEADERS.html" title="constant http::header::ACCESS_CONTROL_ALLOW_HEADERS">ACCESS_CONTROL_ALLOW_HEADERS</a></div><div class="desc docblock-short">Preflight response indicating permitted HTTP headers.</div></li><li><div class="item-name"><a class="constant" href="constant.ACCESS_CONTROL_ALLOW_METHODS.html" title="constant http::header::ACCESS_CONTROL_ALLOW_METHODS">ACCESS_CONTROL_ALLOW_METHODS</a></div><div class="desc docblock-short">Preflight header response indicating permitted access methods.</div></li><li><div class="item-name"><a class="constant" href="constant.ACCESS_CONTROL_ALLOW_ORIGIN.html" title="constant http::header::ACCESS_CONTROL_ALLOW_ORIGIN">ACCESS_CONTROL_ALLOW_ORIGIN</a></div><div class="desc docblock-short">Indicates whether the response can be shared with resources with the
|
||
given origin.</div></li><li><div class="item-name"><a class="constant" href="constant.ACCESS_CONTROL_EXPOSE_HEADERS.html" title="constant http::header::ACCESS_CONTROL_EXPOSE_HEADERS">ACCESS_CONTROL_EXPOSE_HEADERS</a></div><div class="desc docblock-short">Indicates which headers can be exposed as part of the response by
|
||
listing their names.</div></li><li><div class="item-name"><a class="constant" href="constant.ACCESS_CONTROL_MAX_AGE.html" title="constant http::header::ACCESS_CONTROL_MAX_AGE">ACCESS_CONTROL_MAX_AGE</a></div><div class="desc docblock-short">Indicates how long the results of a preflight request can be cached.</div></li><li><div class="item-name"><a class="constant" href="constant.ACCESS_CONTROL_REQUEST_HEADERS.html" title="constant http::header::ACCESS_CONTROL_REQUEST_HEADERS">ACCESS_CONTROL_REQUEST_HEADERS</a></div><div class="desc docblock-short">Informs the server which HTTP headers will be used when an actual
|
||
request is made.</div></li><li><div class="item-name"><a class="constant" href="constant.ACCESS_CONTROL_REQUEST_METHOD.html" title="constant http::header::ACCESS_CONTROL_REQUEST_METHOD">ACCESS_CONTROL_REQUEST_METHOD</a></div><div class="desc docblock-short">Informs the server know which HTTP method will be used when the actual
|
||
request is made.</div></li><li><div class="item-name"><a class="constant" href="constant.AGE.html" title="constant http::header::AGE">AGE</a></div><div class="desc docblock-short">Indicates the time in seconds the object has been in a proxy cache.</div></li><li><div class="item-name"><a class="constant" href="constant.ALLOW.html" title="constant http::header::ALLOW">ALLOW</a></div><div class="desc docblock-short">Lists the set of methods support by a resource.</div></li><li><div class="item-name"><a class="constant" href="constant.ALT_SVC.html" title="constant http::header::ALT_SVC">ALT_SVC</a></div><div class="desc docblock-short">Advertises the availability of alternate services to clients.</div></li><li><div class="item-name"><a class="constant" href="constant.AUTHORIZATION.html" title="constant http::header::AUTHORIZATION">AUTHORIZATION</a></div><div class="desc docblock-short">Contains the credentials to authenticate a user agent with a server.</div></li><li><div class="item-name"><a class="constant" href="constant.CACHE_CONTROL.html" title="constant http::header::CACHE_CONTROL">CACHE_CONTROL</a></div><div class="desc docblock-short">Specifies directives for caching mechanisms in both requests and
|
||
responses.</div></li><li><div class="item-name"><a class="constant" href="constant.CACHE_STATUS.html" title="constant http::header::CACHE_STATUS">CACHE_STATUS</a></div><div class="desc docblock-short">Indicates how caches have handled a response and its corresponding request.</div></li><li><div class="item-name"><a class="constant" href="constant.CDN_CACHE_CONTROL.html" title="constant http::header::CDN_CACHE_CONTROL">CDN_CACHE_CONTROL</a></div><div class="desc docblock-short">Specifies directives that allow origin servers to control the behavior of CDN caches
|
||
interposed between them and clients separately from other caches that might handle the
|
||
response.</div></li><li><div class="item-name"><a class="constant" href="constant.CONNECTION.html" title="constant http::header::CONNECTION">CONNECTION</a></div><div class="desc docblock-short">Controls whether or not the network connection stays open after the
|
||
current transaction finishes.</div></li><li><div class="item-name"><a class="constant" href="constant.CONTENT_DISPOSITION.html" title="constant http::header::CONTENT_DISPOSITION">CONTENT_DISPOSITION</a></div><div class="desc docblock-short">Indicates if the content is expected to be displayed inline.</div></li><li><div class="item-name"><a class="constant" href="constant.CONTENT_ENCODING.html" title="constant http::header::CONTENT_ENCODING">CONTENT_ENCODING</a></div><div class="desc docblock-short">Used to compress the media-type.</div></li><li><div class="item-name"><a class="constant" href="constant.CONTENT_LANGUAGE.html" title="constant http::header::CONTENT_LANGUAGE">CONTENT_LANGUAGE</a></div><div class="desc docblock-short">Used to describe the languages intended for the audience.</div></li><li><div class="item-name"><a class="constant" href="constant.CONTENT_LENGTH.html" title="constant http::header::CONTENT_LENGTH">CONTENT_LENGTH</a></div><div class="desc docblock-short">Indicates the size of the entity-body.</div></li><li><div class="item-name"><a class="constant" href="constant.CONTENT_LOCATION.html" title="constant http::header::CONTENT_LOCATION">CONTENT_LOCATION</a></div><div class="desc docblock-short">Indicates an alternate location for the returned data.</div></li><li><div class="item-name"><a class="constant" href="constant.CONTENT_RANGE.html" title="constant http::header::CONTENT_RANGE">CONTENT_RANGE</a></div><div class="desc docblock-short">Indicates where in a full body message a partial message belongs.</div></li><li><div class="item-name"><a class="constant" href="constant.CONTENT_SECURITY_POLICY.html" title="constant http::header::CONTENT_SECURITY_POLICY">CONTENT_SECURITY_POLICY</a></div><div class="desc docblock-short">Allows controlling resources the user agent is allowed to load for a
|
||
given page.</div></li><li><div class="item-name"><a class="constant" href="constant.CONTENT_SECURITY_POLICY_REPORT_ONLY.html" title="constant http::header::CONTENT_SECURITY_POLICY_REPORT_ONLY">CONTENT_SECURITY_POLICY_REPORT_ONLY</a></div><div class="desc docblock-short">Allows experimenting with policies by monitoring their effects.</div></li><li><div class="item-name"><a class="constant" href="constant.CONTENT_TYPE.html" title="constant http::header::CONTENT_TYPE">CONTENT_TYPE</a></div><div class="desc docblock-short">Used to indicate the media type of the resource.</div></li><li><div class="item-name"><a class="constant" href="constant.COOKIE.html" title="constant http::header::COOKIE">COOKIE</a></div><div class="desc docblock-short">Contains stored HTTP cookies previously sent by the server with the
|
||
Set-Cookie header.</div></li><li><div class="item-name"><a class="constant" href="constant.DATE.html" title="constant http::header::DATE">DATE</a></div><div class="desc docblock-short">Contains the date and time at which the message was originated.</div></li><li><div class="item-name"><a class="constant" href="constant.DNT.html" title="constant http::header::DNT">DNT</a></div><div class="desc docblock-short">Indicates the client’s tracking preference.</div></li><li><div class="item-name"><a class="constant" href="constant.ETAG.html" title="constant http::header::ETAG">ETAG</a></div><div class="desc docblock-short">Identifier for a specific version of a resource.</div></li><li><div class="item-name"><a class="constant" href="constant.EXPECT.html" title="constant http::header::EXPECT">EXPECT</a></div><div class="desc docblock-short">Indicates expectations that need to be fulfilled by the server in order
|
||
to properly handle the request.</div></li><li><div class="item-name"><a class="constant" href="constant.EXPIRES.html" title="constant http::header::EXPIRES">EXPIRES</a></div><div class="desc docblock-short">Contains the date/time after which the response is considered stale.</div></li><li><div class="item-name"><a class="constant" href="constant.FORWARDED.html" title="constant http::header::FORWARDED">FORWARDED</a></div><div class="desc docblock-short">Contains information from the client-facing side of proxy servers that
|
||
is altered or lost when a proxy is involved in the path of the request.</div></li><li><div class="item-name"><a class="constant" href="constant.FROM.html" title="constant http::header::FROM">FROM</a></div><div class="desc docblock-short">Contains an Internet email address for a human user who controls the
|
||
requesting user agent.</div></li><li><div class="item-name"><a class="constant" href="constant.HOST.html" title="constant http::header::HOST">HOST</a></div><div class="desc docblock-short">Specifies the domain name of the server and (optionally) the TCP port
|
||
number on which the server is listening.</div></li><li><div class="item-name"><a class="constant" href="constant.IF_MATCH.html" title="constant http::header::IF_MATCH">IF_MATCH</a></div><div class="desc docblock-short">Makes a request conditional based on the E-Tag.</div></li><li><div class="item-name"><a class="constant" href="constant.IF_MODIFIED_SINCE.html" title="constant http::header::IF_MODIFIED_SINCE">IF_MODIFIED_SINCE</a></div><div class="desc docblock-short">Makes a request conditional based on the modification date.</div></li><li><div class="item-name"><a class="constant" href="constant.IF_NONE_MATCH.html" title="constant http::header::IF_NONE_MATCH">IF_NONE_MATCH</a></div><div class="desc docblock-short">Makes a request conditional based on the E-Tag.</div></li><li><div class="item-name"><a class="constant" href="constant.IF_RANGE.html" title="constant http::header::IF_RANGE">IF_RANGE</a></div><div class="desc docblock-short">Makes a request conditional based on range.</div></li><li><div class="item-name"><a class="constant" href="constant.IF_UNMODIFIED_SINCE.html" title="constant http::header::IF_UNMODIFIED_SINCE">IF_UNMODIFIED_SINCE</a></div><div class="desc docblock-short">Makes the request conditional based on the last modification date.</div></li><li><div class="item-name"><a class="constant" href="constant.LAST_MODIFIED.html" title="constant http::header::LAST_MODIFIED">LAST_MODIFIED</a></div><div class="desc docblock-short">Content-Types that are acceptable for the response.</div></li><li><div class="item-name"><a class="constant" href="constant.LINK.html" title="constant http::header::LINK">LINK</a></div><div class="desc docblock-short">Allows the server to point an interested client to another resource
|
||
containing metadata about the requested resource.</div></li><li><div class="item-name"><a class="constant" href="constant.LOCATION.html" title="constant http::header::LOCATION">LOCATION</a></div><div class="desc docblock-short">Indicates the URL to redirect a page to.</div></li><li><div class="item-name"><a class="constant" href="constant.MAX_FORWARDS.html" title="constant http::header::MAX_FORWARDS">MAX_FORWARDS</a></div><div class="desc docblock-short">Indicates the max number of intermediaries the request should be sent
|
||
through.</div></li><li><div class="item-name"><a class="constant" href="constant.ORIGIN.html" title="constant http::header::ORIGIN">ORIGIN</a></div><div class="desc docblock-short">Indicates where a fetch originates from.</div></li><li><div class="item-name"><a class="constant" href="constant.PRAGMA.html" title="constant http::header::PRAGMA">PRAGMA</a></div><div class="desc docblock-short">HTTP/1.0 header usually used for backwards compatibility.</div></li><li><div class="item-name"><a class="constant" href="constant.PROXY_AUTHENTICATE.html" title="constant http::header::PROXY_AUTHENTICATE">PROXY_AUTHENTICATE</a></div><div class="desc docblock-short">Defines the authentication method that should be used to gain access to
|
||
a proxy.</div></li><li><div class="item-name"><a class="constant" href="constant.PROXY_AUTHORIZATION.html" title="constant http::header::PROXY_AUTHORIZATION">PROXY_AUTHORIZATION</a></div><div class="desc docblock-short">Contains the credentials to authenticate a user agent to a proxy server.</div></li><li><div class="item-name"><a class="constant" href="constant.PUBLIC_KEY_PINS.html" title="constant http::header::PUBLIC_KEY_PINS">PUBLIC_KEY_PINS</a></div><div class="desc docblock-short">Associates a specific cryptographic public key with a certain server.</div></li><li><div class="item-name"><a class="constant" href="constant.PUBLIC_KEY_PINS_REPORT_ONLY.html" title="constant http::header::PUBLIC_KEY_PINS_REPORT_ONLY">PUBLIC_KEY_PINS_REPORT_ONLY</a></div><div class="desc docblock-short">Sends reports of pinning violation to the report-uri specified in the
|
||
header.</div></li><li><div class="item-name"><a class="constant" href="constant.RANGE.html" title="constant http::header::RANGE">RANGE</a></div><div class="desc docblock-short">Indicates the part of a document that the server should return.</div></li><li><div class="item-name"><a class="constant" href="constant.REFERER.html" title="constant http::header::REFERER">REFERER</a></div><div class="desc docblock-short">Contains the address of the previous web page from which a link to the
|
||
currently requested page was followed.</div></li><li><div class="item-name"><a class="constant" href="constant.REFERRER_POLICY.html" title="constant http::header::REFERRER_POLICY">REFERRER_POLICY</a></div><div class="desc docblock-short">Governs which referrer information should be included with requests
|
||
made.</div></li><li><div class="item-name"><a class="constant" href="constant.REFRESH.html" title="constant http::header::REFRESH">REFRESH</a></div><div class="desc docblock-short">Informs the web browser that the current page or frame should be
|
||
refreshed.</div></li><li><div class="item-name"><a class="constant" href="constant.RETRY_AFTER.html" title="constant http::header::RETRY_AFTER">RETRY_AFTER</a></div><div class="desc docblock-short">The Retry-After response HTTP header indicates how long the user agent
|
||
should wait before making a follow-up request. There are two main cases
|
||
this header is used:</div></li><li><div class="item-name"><a class="constant" href="constant.SEC_WEBSOCKET_ACCEPT.html" title="constant http::header::SEC_WEBSOCKET_ACCEPT">SEC_WEBSOCKET_ACCEPT</a></div><div class="desc docblock-short">The |Sec-WebSocket-Accept| header field is used in the WebSocket
|
||
opening handshake. It is sent from the server to the client to
|
||
confirm that the server is willing to initiate the WebSocket
|
||
connection.</div></li><li><div class="item-name"><a class="constant" href="constant.SEC_WEBSOCKET_EXTENSIONS.html" title="constant http::header::SEC_WEBSOCKET_EXTENSIONS">SEC_WEBSOCKET_EXTENSIONS</a></div><div class="desc docblock-short">The |Sec-WebSocket-Extensions| header field is used in the WebSocket
|
||
opening handshake. It is initially sent from the client to the
|
||
server, and then subsequently sent from the server to the client, to
|
||
agree on a set of protocol-level extensions to use for the duration
|
||
of the connection.</div></li><li><div class="item-name"><a class="constant" href="constant.SEC_WEBSOCKET_KEY.html" title="constant http::header::SEC_WEBSOCKET_KEY">SEC_WEBSOCKET_KEY</a></div><div class="desc docblock-short">The |Sec-WebSocket-Key| header field is used in the WebSocket opening
|
||
handshake. It is sent from the client to the server to provide part
|
||
of the information used by the server to prove that it received a
|
||
valid WebSocket opening handshake. This helps ensure that the server
|
||
does not accept connections from non-WebSocket clients (e.g., HTTP
|
||
clients) that are being abused to send data to unsuspecting WebSocket
|
||
servers.</div></li><li><div class="item-name"><a class="constant" href="constant.SEC_WEBSOCKET_PROTOCOL.html" title="constant http::header::SEC_WEBSOCKET_PROTOCOL">SEC_WEBSOCKET_PROTOCOL</a></div><div class="desc docblock-short">The |Sec-WebSocket-Protocol| header field is used in the WebSocket
|
||
opening handshake. It is sent from the client to the server and back
|
||
from the server to the client to confirm the subprotocol of the
|
||
connection. This enables scripts to both select a subprotocol and be
|
||
sure that the server agreed to serve that subprotocol.</div></li><li><div class="item-name"><a class="constant" href="constant.SEC_WEBSOCKET_VERSION.html" title="constant http::header::SEC_WEBSOCKET_VERSION">SEC_WEBSOCKET_VERSION</a></div><div class="desc docblock-short">The |Sec-WebSocket-Version| header field is used in the WebSocket
|
||
opening handshake. It is sent from the client to the server to
|
||
indicate the protocol version of the connection. This enables
|
||
servers to correctly interpret the opening handshake and subsequent
|
||
data being sent from the data, and close the connection if the server
|
||
cannot interpret that data in a safe manner.</div></li><li><div class="item-name"><a class="constant" href="constant.SERVER.html" title="constant http::header::SERVER">SERVER</a></div><div class="desc docblock-short">Contains information about the software used by the origin server to
|
||
handle the request.</div></li><li><div class="item-name"><a class="constant" href="constant.SET_COOKIE.html" title="constant http::header::SET_COOKIE">SET_COOKIE</a></div><div class="desc docblock-short">Used to send cookies from the server to the user agent.</div></li><li><div class="item-name"><a class="constant" href="constant.STRICT_TRANSPORT_SECURITY.html" title="constant http::header::STRICT_TRANSPORT_SECURITY">STRICT_TRANSPORT_SECURITY</a></div><div class="desc docblock-short">Tells the client to communicate with HTTPS instead of using HTTP.</div></li><li><div class="item-name"><a class="constant" href="constant.TE.html" title="constant http::header::TE">TE</a></div><div class="desc docblock-short">Informs the server of transfer encodings willing to be accepted as part
|
||
of the response.</div></li><li><div class="item-name"><a class="constant" href="constant.TRAILER.html" title="constant http::header::TRAILER">TRAILER</a></div><div class="desc docblock-short">Allows the sender to include additional fields at the end of chunked
|
||
messages.</div></li><li><div class="item-name"><a class="constant" href="constant.TRANSFER_ENCODING.html" title="constant http::header::TRANSFER_ENCODING">TRANSFER_ENCODING</a></div><div class="desc docblock-short">Specifies the form of encoding used to safely transfer the entity to the
|
||
client.</div></li><li><div class="item-name"><a class="constant" href="constant.UPGRADE.html" title="constant http::header::UPGRADE">UPGRADE</a></div><div class="desc docblock-short">Used as part of the exchange to upgrade the protocol.</div></li><li><div class="item-name"><a class="constant" href="constant.UPGRADE_INSECURE_REQUESTS.html" title="constant http::header::UPGRADE_INSECURE_REQUESTS">UPGRADE_INSECURE_REQUESTS</a></div><div class="desc docblock-short">Sends a signal to the server expressing the client’s preference for an
|
||
encrypted and authenticated response.</div></li><li><div class="item-name"><a class="constant" href="constant.USER_AGENT.html" title="constant http::header::USER_AGENT">USER_AGENT</a></div><div class="desc docblock-short">Contains a string that allows identifying the requesting client’s
|
||
software.</div></li><li><div class="item-name"><a class="constant" href="constant.VARY.html" title="constant http::header::VARY">VARY</a></div><div class="desc docblock-short">Determines how to match future requests with cached responses.</div></li><li><div class="item-name"><a class="constant" href="constant.VIA.html" title="constant http::header::VIA">VIA</a></div><div class="desc docblock-short">Added by proxies to track routing.</div></li><li><div class="item-name"><a class="constant" href="constant.WARNING.html" title="constant http::header::WARNING">WARNING</a></div><div class="desc docblock-short">General HTTP header contains information about possible problems with
|
||
the status of the message.</div></li><li><div class="item-name"><a class="constant" href="constant.WWW_AUTHENTICATE.html" title="constant http::header::WWW_AUTHENTICATE">WWW_AUTHENTICATE</a></div><div class="desc docblock-short">Defines the authentication method that should be used to gain access to
|
||
a resource.</div></li><li><div class="item-name"><a class="constant" href="constant.X_CONTENT_TYPE_OPTIONS.html" title="constant http::header::X_CONTENT_TYPE_OPTIONS">X_CONTENT_TYPE_OPTIONS</a></div><div class="desc docblock-short">Marker used by the server to indicate that the MIME types advertised in
|
||
the <code>content-type</code> headers should not be changed and be followed.</div></li><li><div class="item-name"><a class="constant" href="constant.X_DNS_PREFETCH_CONTROL.html" title="constant http::header::X_DNS_PREFETCH_CONTROL">X_DNS_PREFETCH_CONTROL</a></div><div class="desc docblock-short">Controls DNS prefetching.</div></li><li><div class="item-name"><a class="constant" href="constant.X_FRAME_OPTIONS.html" title="constant http::header::X_FRAME_OPTIONS">X_FRAME_OPTIONS</a></div><div class="desc docblock-short">Indicates whether or not a browser should be allowed to render a page in
|
||
a frame.</div></li><li><div class="item-name"><a class="constant" href="constant.X_XSS_PROTECTION.html" title="constant http::header::X_XSS_PROTECTION">X_XSS_PROTECTION</a></div><div class="desc docblock-short">Stop pages from loading when an XSS attack is detected.</div></li></ul><h2 id="traits" class="section-header"><a href="#traits">Traits</a></h2><ul class="item-table"><li><div class="item-name"><a class="trait" href="trait.AsHeaderName.html" title="trait http::header::AsHeaderName">AsHeaderName</a></div><div class="desc docblock-short">A marker trait used to identify values that can be used as search keys
|
||
to a <code>HeaderMap</code>.</div></li><li><div class="item-name"><a class="trait" href="trait.IntoHeaderName.html" title="trait http::header::IntoHeaderName">IntoHeaderName</a></div><div class="desc docblock-short">A marker trait used to identify values that can be used as insert keys
|
||
to a <code>HeaderMap</code>.</div></li></ul></section></div></main></body></html> |