mirror of
https://github.com/fafhrd91/actix-web
synced 2024-11-24 08:22:59 +01:00
69 lines
36 KiB
HTML
69 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="Pre-defined `HeaderName`s, traits for parsing and conversion, and other header utility methods."><title>awc::http::header - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-dd39b87e5fcfba68.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="awc" data-themes="" data-resource-suffix="" data-rustdoc-version="1.80.0-nightly (bdbbb6c6a 2024-05-26)" data-channel="nightly" data-search-js="search-d52510db62a78183.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../../static.files/storage-118b08c4c78b968e.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-df360f571f6edeae.css"></noscript><link rel="icon" href="https://actix.rs/favicon.ico"></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" title="show sidebar"></button><a class="logo-container" href="../../../awc/index.html"><img src="https://actix.rs/img/logo.png" alt=""></a></nav><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="../../../awc/index.html"><img src="https://actix.rs/img/logo.png" alt="logo"></a><h2><a href="../../../awc/index.html">awc</a><span class="version">3.5.0</span></h2></div><h2 class="location"><a href="#">Module header</a></h2><div class="sidebar-elems"><section><ul class="block"><li><a href="#modules">Modules</a></li><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><li><a href="#functions">Functions</a></li></ul></section><h2><a href="../index.html">In awc::http</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Module <a href="../../index.html">awc</a>::<wbr><a href="../index.html">http</a>::<wbr><a class="mod" href="#">header</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><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>Pre-defined <code>HeaderName</code>s, traits for parsing and conversion, and other header utility methods.</p>
|
||
</div></details><h2 id="modules" class="section-header">Modules<a href="#modules" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="mod" href="map/index.html" title="mod awc::http::header::map">map</a></div><div class="desc docblock-short">A multi-value <a href="struct.HeaderMap.html" title="struct awc::http::header::HeaderMap"><code>HeaderMap</code></a> and its iterators.</div></li></ul><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.ExtendedValue.html" title="struct awc::http::header::ExtendedValue">ExtendedValue</a></div><div class="desc docblock-short">The value part of an extended parameter consisting of three parts:</div></li><li><div class="item-name"><a class="struct" href="struct.HeaderMap.html" title="struct awc::http::header::HeaderMap">HeaderMap</a></div><div class="desc docblock-short">A multi-map of HTTP headers.</div></li><li><div class="item-name"><a class="struct" href="struct.HeaderName.html" title="struct awc::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 awc::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.HttpDate.html" title="struct awc::http::header::HttpDate">HttpDate</a></div><div class="desc docblock-short">A timestamp with HTTP-style formatting and parsing.</div></li><li><div class="item-name"><a class="struct" href="struct.InvalidHeaderName.html" title="struct awc::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 awc::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.LanguageTag.html" title="struct awc::http::header::LanguageTag">LanguageTag</a></div><div class="desc docblock-short">A language tag as described in <a href="https://tools.ietf.org/html/rfc5646">RFC 5646</a>.</div></li><li><div class="item-name"><a class="struct" href="struct.Quality.html" title="struct awc::http::header::Quality">Quality</a></div><div class="desc docblock-short">Represents a quality used in q-factor values.</div></li><li><div class="item-name"><a class="struct" href="struct.QualityItem.html" title="struct awc::http::header::QualityItem">QualityItem</a></div><div class="desc docblock-short">Represents an item with a quality value as defined
|
||
in <a href="https://datatracker.ietf.org/doc/html/rfc7231#section-5.3.1">RFC 7231 §5.3.1</a>.</div></li><li><div class="item-name"><a class="struct" href="struct.ToStrError.html" title="struct awc::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></ul><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="enum" href="enum.Charset.html" title="enum awc::http::header::Charset">Charset</a></div><div class="desc docblock-short">A MIME character set.</div></li><li><div class="item-name"><a class="enum" href="enum.ContentEncoding.html" title="enum awc::http::header::ContentEncoding">ContentEncoding</a></div><div class="desc docblock-short">Represents a supported content encoding.</div></li></ul><h2 id="constants" class="section-header">Constants<a href="#constants" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="constant" href="constant.ACCEPT.html" title="constant awc::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 awc::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 awc::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 awc::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 awc::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 awc::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 awc::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 awc::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 awc::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 awc::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 awc::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 awc::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 awc::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 awc::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 awc::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 awc::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 awc::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 awc::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 awc::http::header::CACHE_STATUS">CACHE_STATUS</a></div><div class="desc docblock-short">Response header field that indicates how caches have handled that response and its corresponding
|
||
request.</div></li><li><div class="item-name"><a class="constant" href="constant.CDN_CACHE_CONTROL.html" title="constant awc::http::header::CDN_CACHE_CONTROL">CDN_CACHE_CONTROL</a></div><div class="desc docblock-short">Response header field that allows 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 awc::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 awc::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 awc::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 awc::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 awc::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 awc::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 awc::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 awc::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 awc::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 awc::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 awc::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.CROSS_ORIGIN_EMBEDDER_POLICY.html" title="constant awc::http::header::CROSS_ORIGIN_EMBEDDER_POLICY">CROSS_ORIGIN_EMBEDDER_POLICY</a></div><div class="desc docblock-short">Response header that prevents a document from loading any cross-origin resources that don’t
|
||
explicitly grant the document permission (using <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Cross-Origin_Resource_Policy_(CORP)">CORP</a> or <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS">CORS</a>).</div></li><li><div class="item-name"><a class="constant" href="constant.CROSS_ORIGIN_OPENER_POLICY.html" title="constant awc::http::header::CROSS_ORIGIN_OPENER_POLICY">CROSS_ORIGIN_OPENER_POLICY</a></div><div class="desc docblock-short">Response header that allows you to ensure a top-level document does not share a browsing context
|
||
group with cross-origin documents.</div></li><li><div class="item-name"><a class="constant" href="constant.CROSS_ORIGIN_RESOURCE_POLICY.html" title="constant awc::http::header::CROSS_ORIGIN_RESOURCE_POLICY">CROSS_ORIGIN_RESOURCE_POLICY</a></div><div class="desc docblock-short">Response header that conveys a desire that the browser blocks no-cors cross-origin/cross-site
|
||
requests to the given resource.</div></li><li><div class="item-name"><a class="constant" href="constant.DATE.html" title="constant awc::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 awc::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 awc::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 awc::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 awc::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 awc::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 awc::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 awc::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 awc::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 awc::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 awc::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 awc::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 awc::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 awc::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 awc::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 awc::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 awc::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 awc::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.PERMISSIONS_POLICY.html" title="constant awc::http::header::PERMISSIONS_POLICY">PERMISSIONS_POLICY</a></div><div class="desc docblock-short">Response header that provides a mechanism to allow and deny the use of browser features in a
|
||
document or within any <code><iframe></code> elements in the document.</div></li><li><div class="item-name"><a class="constant" href="constant.PRAGMA.html" title="constant awc::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 awc::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 awc::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 awc::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 awc::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 awc::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 awc::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 awc::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 awc::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 awc::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 awc::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 awc::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 awc::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 awc::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 awc::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 awc::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 awc::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 awc::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 awc::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 awc::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 awc::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 awc::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 awc::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 awc::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 awc::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 awc::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 awc::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 awc::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 awc::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 awc::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_FORWARDED_FOR.html" title="constant awc::http::header::X_FORWARDED_FOR">X_FORWARDED_FOR</a></div><div class="desc docblock-short">Request header (de-facto standard) for identifying the originating IP address of a client
|
||
connecting to a web server through a proxy server.</div></li><li><div class="item-name"><a class="constant" href="constant.X_FORWARDED_HOST.html" title="constant awc::http::header::X_FORWARDED_HOST">X_FORWARDED_HOST</a></div><div class="desc docblock-short">Request header (de-facto standard) for identifying the original host requested by the client in
|
||
the <code>Host</code> HTTP request header.</div></li><li><div class="item-name"><a class="constant" href="constant.X_FORWARDED_PROTO.html" title="constant awc::http::header::X_FORWARDED_PROTO">X_FORWARDED_PROTO</a></div><div class="desc docblock-short">Request header (de-facto standard) for identifying the protocol that a client used to connect to
|
||
your proxy or load balancer.</div></li><li><div class="item-name"><a class="constant" href="constant.X_FRAME_OPTIONS.html" title="constant awc::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 awc::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">Traits<a href="#traits" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="trait" href="trait.AsHeaderName.html" title="trait awc::http::header::AsHeaderName">AsHeaderName</a></div><div class="desc docblock-short">Sealed trait implemented for types that can be effectively borrowed as a <a href="struct.HeaderValue.html" title="struct awc::http::header::HeaderValue"><code>HeaderValue</code></a>.</div></li><li><div class="item-name"><a class="trait" href="trait.Header.html" title="trait awc::http::header::Header">Header</a></div><div class="desc docblock-short">An interface for types that already represent a valid header.</div></li><li><div class="item-name"><a class="trait" href="trait.TryIntoHeaderPair.html" title="trait awc::http::header::TryIntoHeaderPair">TryIntoHeaderPair</a></div><div class="desc docblock-short">An interface for types that can be converted into a <a href="struct.HeaderName.html" title="struct awc::http::header::HeaderName"><code>HeaderName</code></a> + <a href="struct.HeaderValue.html" title="struct awc::http::header::HeaderValue"><code>HeaderValue</code></a> pair for
|
||
insertion into a <a href="struct.HeaderMap.html" title="struct awc::http::header::HeaderMap"><code>HeaderMap</code></a>.</div></li><li><div class="item-name"><a class="trait" href="trait.TryIntoHeaderValue.html" title="trait awc::http::header::TryIntoHeaderValue">TryIntoHeaderValue</a></div><div class="desc docblock-short">An interface for types that can be converted into a <a href="struct.HeaderValue.html" title="struct awc::http::header::HeaderValue"><code>HeaderValue</code></a>.</div></li></ul><h2 id="functions" class="section-header">Functions<a href="#functions" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="fn" href="fn.fmt_comma_delimited.html" title="fn awc::http::header::fmt_comma_delimited">fmt_comma_delimited</a></div><div class="desc docblock-short">Format an array into a comma-delimited string.</div></li><li><div class="item-name"><a class="fn" href="fn.from_comma_delimited.html" title="fn awc::http::header::from_comma_delimited">from_comma_delimited</a></div><div class="desc docblock-short">Reads a comma-delimited raw header into a Vec.</div></li><li><div class="item-name"><a class="fn" href="fn.from_one_raw_str.html" title="fn awc::http::header::from_one_raw_str">from_one_raw_str</a></div><div class="desc docblock-short">Reads a single string when parsing a header.</div></li><li><div class="item-name"><a class="fn" href="fn.http_percent_encode.html" title="fn awc::http::header::http_percent_encode">http_percent_encode</a></div><div class="desc docblock-short">Percent encode a sequence of bytes with a character set defined in <a href="https://datatracker.ietf.org/doc/html/rfc5987#section-3.2">RFC 5987 §3.2</a>.</div></li><li><div class="item-name"><a class="fn" href="fn.parse_extended_value.html" title="fn awc::http::header::parse_extended_value">parse_extended_value</a></div><div class="desc docblock-short">Parses extended header parameter values (<code>ext-value</code>), as defined
|
||
in <a href="https://datatracker.ietf.org/doc/html/rfc5987#section-3.2">RFC 5987 §3.2</a>.</div></li><li><div class="item-name"><a class="fn" href="fn.q.html" title="fn awc::http::header::q">q</a></div><div class="desc docblock-short">Convenience function to create a <a href="struct.Quality.html" title="struct awc::http::header::Quality"><code>Quality</code></a> from an <code>f32</code> (0.0–1.0).</div></li></ul></section></div></main></body></html> |