Rust

transport

Module

How registrar adapters reach their APIs: the Transport trait and HttpTransport, the default one over HTTPS.

Contents

use utopia_domains::transport::HttpTransport;
Rust
pub struct HttpTransport

The default transport: HTTP/1.1 over TLS with the WebPKI roots, the request's timeouts, certificates verified, redirects not followed (follow_redirects turns them on).

Also implements Debug.
use utopia_domains::transport::Request;
Rust
pub struct Request

An HTTP request an adapter sends.

use utopia_domains::transport::Response;
Rust
pub struct Response

An HTTP response.

use utopia_domains::transport::TransportError;
Rust
pub struct TransportError(pub String)

The error of a request that could not be sent or got no response.

use utopia_domains::transport::Transport;
Rust
pub trait Transport: Send + Sync

Sends requests for an adapter. Give an adapter your own transport to route, record or replay its traffic.

Implemented byArcHttpTransport
use utopia_domains::transport::normalize_url;
Rust
pub fn normalize_url(url: &str) -> Option<String>

A request URL as HTTP messages hold it: scheme and host lower-cased, the default port dropped, path, query and fragment percent-encoded where they must be. None for a URL that does not parse.