Class TypeSafeResponse<T>
Parsed data with its HTTP response and request ID. Mirrors JS WithResponse.
public sealed class TypeSafeResponse<T>
Type Parameters
T
- Inheritance
-
TypeSafeResponse<T>
- Inherited Members
Constructors
TypeSafeResponse(T, HttpResponseMessage, string?)
Create a typed response wrapper.
public TypeSafeResponse(T data, HttpResponseMessage response, string? requestId)
Parameters
dataTresponseHttpResponseMessagerequestIdstring
Properties
Data
The parsed response body.
public T Data { get; }
Property Value
- T
RequestId
Request ID from x-typesafe-request-id, or null when absent.
public string? RequestId { get; }
Property Value
Response
The HTTP response, with its body already consumed by parsing.
public HttpResponseMessage Response { get; }