Skip to main content

fetch_async

Function fetch_async 

Source
pub fn fetch_async(
    req: Request,
    on_done: impl FnOnce(Result<Response, HttpError>) + Send + 'static,
)
Expand description

Perform the request without blocking; on_done runs on an unspecified background thread (capture a reactive Setter to deliver into UI state; see the crate docs). On the web the completion runs on the browser thread, the only one, which the Setter idiom absorbs unchanged.