Skip to main content

Module http

Module http 

Source
Expand description

submilli:http — agent-facing HTTP client library.

Pure Rust host functions registered directly under the package name. Response and DownloadResult are host-built backing structs the guest holds opaquely and reads through the registered getters; Headers maps are real prelude Map<string, string>s built and consumed host-side. The embedder-facing transport traits live in transport, the SSRF policy in policy.

Re-exports§

pub use policy::NetworkPolicy;
pub use transport::AuthProxy;
pub use transport::AuthProxyError;
pub use transport::EgressAt;
pub use transport::HttpClient;
pub use transport::HttpError;
pub use transport::HttpRequest;
pub use transport::HttpResponse;
pub use transport::NoopAuthProxy;
pub use transport::RecordedRequest;
pub use transport::RedirectDenied;
pub use transport::RedirectGuard;
pub use transport::RedirectHop;
pub use transport::ReqwestHttpClient;
pub use transport::default_auth_proxy;
pub use transport::default_http_client;
pub use transport::describe_error_chain;
pub use transport::is_policy_refusal;

Modules§

policy
Network egress policy for outbound HTTP — SSRF protection.
transport
Transport layer for submilli:http — the embedder-facing HttpClient / AuthProxy traits, the default reqwest client with SSRF policy, and the bounded download/decompression plumbing. No Wasm ABI here; the package’s host fns live in super.

Structs§

HttpTransportPolicy
Custom HTTP transports must check the initial destination and every redirect with this policy before sending. A request without a policy keeps the embedder’s existing transport behavior.

Enums§

TransportPolicyError
Contains no request URL, headers, or query values, so credentials cannot leak through a policy diagnostic.

Constants§

MODULE_NAME

Functions§

install
package_declaration