ReqLLM.Streaming.Fixtures.HTTPContext
(ReqLLM v1.11.0)
View Source
Lightweight HTTP context for streaming operations.
This struct contains the minimal HTTP metadata needed for fixture capture and debugging, replacing the heavier Req.Request/Response structs for streaming operations.
Summary
Functions
Builds HTTPContext from a Finch.Request struct.
Creates a new HTTPContext from request parameters.
Updates the context with response status and headers.
Types
Functions
@spec from_finch_request(Finch.Request.t()) :: t()
Builds HTTPContext from a Finch.Request struct.
Extracts URL, method, and headers with proper sanitization.
@spec new( String.t(), :get | :post | :put | :patch | :delete | :head | :options | :unknown, map() ) :: t()
Creates a new HTTPContext from request parameters.
Updates the context with response status and headers.