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.

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

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

Performs the conversion.

Performs the conversion.

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.