[−][src]Trait fastly::request::RequestExt
Required methods
fn inner_to_body(self) -> Result<Request<Body>, Error>
Replace the body of a request with a Body
with the same contents.
fn inner_to_bytes(self) -> Result<Request<Vec<u8>>, Error>
Replace the body of a request with the remaining contents of its body.
Note that this will involve copying and buffering the body, and so should only be used for convenience on small request bodies.
fn fastly_metadata(&self) -> &FastlyRequestMetadata
Get a reference to the Fastly-specific metadata associated with this request.
fn fastly_metadata_mut(&mut self) -> &mut FastlyRequestMetadata
Get a mutable reference to the Fastly-specific metadata associated with this request.
Provided methods
fn send(self, backend: &str) -> Result<Response<Body>, Error>
Send a request via the given backend, returning as soon as the headers are available.
fn send_async(self, backend: &str) -> Result<PendingRequest, Error>
Send a request asynchronously via the given backend, returning as soon as the request has begun sending.
The resulting PendingRequest
can be evaluated using
PendingRequest::poll()
,
PendingRequest::wait()
, or
select
. It can also be discarded if the request was sent for effects it
might have, and the response is unimportant.
fn set_cache_override(&mut self, cache_override: CacheOverride)
Set the cache override behavior for this request.
fn get_cache_override(&self) -> CacheOverride
Get the cache override behavior for this request.
fn set_pass(&mut self)
Set the cache override behavior for this request to Pass.
fn set_ttl(&mut self, ttl: u32)
Set the cache override behavior for this request to use given TTL.
fn set_stale_while_revalidate(&mut self, swr: u32)
Set the cache override behavior for this request to use given stale-while-revalidate
time.
Implementors
impl RequestExt for Request<()>
[src]
fn inner_to_body(self) -> Result<Request<Body>, Error>
[src]
fn inner_to_bytes(self) -> Result<Request<Vec<u8>>, Error>
[src]
fn fastly_metadata(&self) -> &FastlyRequestMetadata
[src]
fn fastly_metadata_mut(&mut self) -> &mut FastlyRequestMetadata
[src]
impl RequestExt for Request<Body>
[src]
Fastly-specific extensions to http::Request
.