Enum worker_plus::Fetch
source · pub enum Fetch {
Url(Url),
Request(WorkerRequest),
}
Expand description
Construct a Fetch call from a URL string or a Request object. Call its send
method to execute
the request.
Variants§
Url(Url)
Request(WorkerRequest)
Implementations§
source§impl Fetch
impl Fetch
sourcepub async fn send(&self) -> Result<WorkerResponse>
pub async fn send(&self) -> Result<WorkerResponse>
Execute a Fetch call and receive a Response.
sourcepub async fn send_with_signal(
&self,
signal: &AbortSignal
) -> Result<WorkerResponse>
pub async fn send_with_signal(
&self,
signal: &AbortSignal
) -> Result<WorkerResponse>
Execute a Fetch call and receive a Response.