TypeSafeResponse<T>
Namespace: TypeSafe.AI.Sdk
public sealed class TypeSafeResponse<T>Parsed data with its HTTP response and request ID. Mirrors JS WithResponse.
Type parameters
| Name | Description |
|---|---|
T |
Inheritance: object
Constructors
Section titled “Constructors”TypeSafeResponse(T, HttpResponseMessage, string?)
Section titled “TypeSafeResponse(T, HttpResponseMessage, string?)”public TypeSafeResponse(T data, HttpResponseMessage response, string? requestId)Create a typed response wrapper.
Parameters
| Name | Type | Description |
|---|---|---|
data |
T |
|
response |
HttpResponseMessage | |
requestId |
string |
Properties
Section titled “Properties”public T Data { get; }The parsed response body.
Value: T
RequestId
Section titled “RequestId”public string? RequestId { get; }Request ID from x-typesafe-request-id, or null when absent.
Value: string
Response
Section titled “Response”public HttpResponseMessage Response { get; }The HTTP response, with its body already consumed by parsing.
Value: HttpResponseMessage
MIT · Copyright (c) Dario Kondratiuk. · not affiliated with TypeSafe beyond being a client of the public API