pub enum LoaderRequest {
Fetch {
request: Request,
responder: LoaderFetchResponder,
},
Start {
request: Request,
client: ClientEnd<LoaderClientMarker>,
control_handle: LoaderControlHandle,
},
}
Expand description
An HTTP and HTTPS loader.
The loader can service many HTTP or HTTPS requests concurrently. The loader tracks all the outstanding requests and will cancel them all if the client closes the loader interface.
Variants§
Fetch
Initiate the given HTTP or HTTPS request, follow redirects, and return the final response.
The loader will follow redirects (up to an implementation-defined limit)
and return the final response as a reply to this message. To cancel the
request, either close the loader interface or close the peer to the
event
included in the request
.
Start
Initiate the given HTTP or HTTPS request and return all intermediate responses to the given client.
Unlike Fetch
, Start
does not automatically follow all redirects.
Instead, each individual response along the redirect chain is delivered
to the LoaderClient
.
Implementations§
Source§impl LoaderRequest
impl LoaderRequest
pub fn into_fetch(self) -> Option<(Request, LoaderFetchResponder)>
pub fn into_start( self, ) -> Option<(Request, ClientEnd<LoaderClientMarker>, LoaderControlHandle)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL