Struct sauron::Http [−][src]
pub struct Http;
Expand description
Provides functions for doing http network request
Implementations
fetch text document from the url and decode the result with the supplied response_text_decoder function
pub fn fetch_with_request_and_response_decoder<APP, MSG, DECODER, ERROR>(
url: &str,
request_init: Option<RequestInit>,
decoder_dispatcher: DECODER,
error_cb: ERROR
) -> Cmd<Program<APP, MSG>> where
MSG: 'static,
APP: Application<MSG> + 'static,
ERROR: Fn(TypeError) -> MSG + 'static,
DECODER: Fn((Response, Program<APP, MSG>)) + 'static,
pub fn fetch_with_request_and_response_decoder<APP, MSG, DECODER, ERROR>(
url: &str,
request_init: Option<RequestInit>,
decoder_dispatcher: DECODER,
error_cb: ERROR
) -> Cmd<Program<APP, MSG>> where
MSG: 'static,
APP: Application<MSG> + 'static,
ERROR: Fn(TypeError) -> MSG + 'static,
DECODER: Fn((Response, Program<APP, MSG>)) + 'static,
API for fetching http rest request error_cb - request failed, in cases where a network is down, server is dead, etc.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Http
impl UnwindSafe for Http
Blanket Implementations
Mutably borrows from an owned value. Read more