Skip to main content

Crate codex_client

Crate codex_client 

Source

Structs§

CodexHttpClient
Reusable HTTP client wrapper with shared tracing and request-diagnostic behavior.
CodexRequestBuilder
EncodedJsonBody
A JSON request body serialized once into reference-counted bytes.
HttpClient
Reusable HTTP client wrapper with shared tracing and request-diagnostic behavior.
HttpClientBuilder
Configures an HttpClient without exposing the underlying HTTP implementation.
HttpClientFactory
Builds route-specific HTTP clients using one resolved outbound proxy policy.
PreparedRequestBody
Request
RequestBuilder
ReqwestTransport
Response
RetryOn
RetryPolicy
RouteAwareClientPool
Reuses transport clients by resolved route while selecting a route for every request URL.
RouteAwareRequestBuilder
StreamResponse

Enums§

BuildCustomCaTransportError
Describes why a transport using shared custom CA support could not be constructed.
BuildRouteAwareHttpClientError
Error while building a resolver-aware reqwest client.
ClientRouteClass
Coarse semantic bucket for the HTTP or WebSocket client being constructed.
OutboundProxyPolicy
Resolved outbound proxy behavior for HTTP clients.
OutboundProxyRoute
Resolved proxy route for a concrete outbound destination.
RequestBody
RequestCompression
RouteAwareClientPoolError
Error returned when selecting a route or constructing its pooled HTTP client.
RouteAwareRequestError
Error returned while building, routing, or sending a route-aware request.
RouteFailureClass
Coarse failure class for route selection errors.
StreamError
TransportError

Traits§

HttpTransport
RequestTelemetry
API specific telemetry.

Functions§

backoff
build_reqwest_client_for_subprocess_tests
Builds a reqwest client for spawned subprocess tests that exercise CA behavior.
build_reqwest_client_with_custom_ca
Builds a reqwest client that honors Codex custom CA environment variables.
build_rustls_client_config_with_custom_ca
Builds a rustls client config using native roots and any configured Codex custom CA bundle.
is_allowed_chatgpt_host
Returns whether host is one of the ChatGPT hosts Codex is allowed to treat as first-party ChatGPT HTTP traffic.
maybe_build_rustls_client_config_with_custom_ca
Builds a rustls client config when a Codex custom CA bundle is configured.
run_with_retry
sse_stream
Minimal SSE helper that forwards raw data: frames as UTF-8 strings.
with_chatgpt_cloudflare_cookie_store
Adds the process-local ChatGPT Cloudflare cookie jar used by Codex HTTP clients.

Type Aliases§

ByteStream
HttpError
HttpResponse