Table of Contents

Class TypeSafeResponse<T>

Namespace
TypeSafe.AI.Sdk
Assembly
TypeSafe.AI.Sdk.dll

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

data T
response HttpResponseMessage
requestId string

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

string

Response

The HTTP response, with its body already consumed by parsing.

public HttpResponseMessage Response { get; }

Property Value

HttpResponseMessage