Struct worker_plus::Request

source ·
pub struct Request { /* private fields */ }
Expand description

A Request representation for handling incoming and creating outbound HTTP requests.

Implementations§

Construct a new Request with an HTTP Method.

Construct a new Request with a RequestInit configuration.

Access this request’s body encoded as JSON.

Access this request’s body as plaintext.

Access this request’s body as raw bytes.

Access this request’s body as a form-encoded payload and pull out fields and files.

Access this request’s body as a Stream of bytes.

Get the Headers for this request.

Get a mutable reference to this request’s Headers. Note: they can only be modified if the request was created from scratch or cloned.

Access this request’s Cloudflare-specific properties.

The HTTP Method associated with this Request.

The URL Path of this Request.

Get a mutable reference to this request’s path. Note: they can only be modified if the request was created from scratch or cloned.

The parsed url::Url of this Request.

Trait Implementations§

Formats the value using the given formatter. Read more
Converts to this type from the input type.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.