Skip to main content

Module http

Module http 

Source
Expand description

HTTP fetch backend abstraction.

HttpClient is the trait boundary between the fetch tool and the underlying HTTP stack. The concrete implementation comes from defect-http; during session assembly the CLI injects Arc<dyn HttpClient> into crate::session::AgentCore, propagated through crate::tool::ToolContext to tools.

Unlike crate::fs::FsBackend / crate::shell::ShellBackend, HTTP has no per-client capability negotiation, so HttpClient is shared at the process level rather than assembled per session; it simply reuses the same Arc<dyn …> injection pattern to avoid introducing a new injection path.

Structs§

HttpRequest
An HTTP fetch request.
HttpResponse
A response that was fetched successfully.
NoopHttpClient
A placeholder implementation for testing or an echo provider. Every fetch call returns HttpClientError::Transport, allowing assembly paths that require Arc<dyn HttpClient> to skip constructing a real HTTP stack.

Enums§

HttpClientError

Traits§

HttpClient
HTTP fetch backend trait.