Module local_server

Source
Available on crate feature local-server only.
Expand description

A server that binds to a random port on localhost and waits for a GET HTTP request.

§Example

use matrix_sdk::utils::local_server::LocalServerBuilder;

let (uri, server_handle) = LocalServerBuilder::new().spawn().await?;

open_uri(uri);

if let Some(query_string) = server_handle.await {
    parse_query_string(&query_string);
}

Structs§

LocalServerBuilder
Builder for a server that binds on a random port on localhost and waits for a GET HTTP request.
LocalServerRedirectHandle
A handle to wait for the end-user to be redirected to a server spawned by LocalServerBuilder.
LocalServerShutdownHandle
A handle to shutdown a server spawned by LocalServerBuilder.
QueryString
A query string from a URI.

Enums§

LocalServerIpAddress
The IP address that we want the LocalServerBuilder to bind to.
LocalServerResponse
The content that the end user will see when they a redirected to the local server’s URI.