Skip to main content

Module local_http

Module local_http 

Source
Expand description

The HTTP client of a program that only talks to the local AgentMux server (the MCP server, bashwrap, the desktop host’s credential broker): plain http on the loopback, never https.

reqwest 0.13 reads the machine’s certificates whenever a client is built, as soon as any crate built in the same cargo invocation turns TLS on (the server package builds agentmux-srv, agentmux-mcp and agentmux-bashwrap together, so all three get it), and on a Linux machine with none it refuses to build the client: agentmux-mcp panicked at start on such a machine. These programs never make an https request, so their clients are built to trust nothing: no certificates are read, and a build cannot fail for want of them. srv, which does make https requests, has its own helper (crates/srv-core/src/http_client.rs); scripts/check-srv-http-clients.mjs fails CI on a client built any other way in these crates.

Functions§

builder
A client builder that trusts nothing and reads no certificates: set what the site needs and build().
client
A client with reqwest’s defaults, for a site that sets nothing. Never fails: with the provider installed, trusting nothing is a valid configuration.