Skip to main content

Module http_client

Module http_client 

Source
Expand description

Authenticated JSON over HTTP: the transport under every remote inference backend, with no knowledge of role or vendor. Authenticated JSON over HTTP — the transport layer under every remote inference backend.

§What this module deliberately does NOT know

Not which role is calling: nothing here mentions embedding or extraction, and the caller supplies its own ureq::Agent precisely because the two roles need different ceilings (an embedding answers in a moment, a generation can take minutes). A client that built its own agent would have to know which of the two it was serving.

Not which vendor is answering either. Once the path, the body and the auth scheme all come from the caller, nothing OpenAI-specific is left — which is the honest reason this is not called an “OpenAI client”. The OpenAI protocol lives one layer up, in [crate::openai]; Azure, Gemini or Anthropic would each get their own protocol module over this same transport.

Not velesdb-server’s [crate::http] either, despite the neighbouring name: that module serves MCP over HTTP, this one calls a model.

Structs§

HttpJsonClient
A JSON-over-HTTP caller bound to one base URL and one credential.

Enums§

Auth
How a request proves who it is.