nemoguardrails.http.types
Dependency-free request and response values for outbound HTTP calls.
Module Contents
Classes
API
Describe an outbound HTTP request without transport-specific objects.
The value is suitable for status-error context and deterministic test assertions. It does not perform a request itself.
A materialized, transport-neutral HTTP response.
content owns the response bytes, so callers can decode the body after
the transport or client context has closed. extensions carries optional
non-portable metadata without changing the core contract.
Return whether the status code is in the 2xx range.
Decode the response body using its declared charset or UTF-8.
Decode the response body as JSON.
Raises:
HTTPResponseDecodeError: If the body is not valid JSON.
Raise :class:HTTPStatusError for status codes of 400 or greater.
Configure TLS verification and optional mutual authentication.
A custom CA bundle applies only when verification is enabled. Client certificate and key paths must be supplied together.