@twinfinity/core
    Preparing search index...

    Class HttpResponseType

    Used with TwinfinityApiClient.get to convert responses to correct data. See TwinfinityApiClient.get for an example.

    Index

    Properties

    arrayBuffer: (r: Response) => TypedResponse<ArrayBuffer>

    Converts an array buffer Response to .

    blob: (r: Response) => TypedResponse<Blob>

    Converts a blob Response to .

    empty: (r: Response) => TypedResponse<undefined>

    Converts an empty Response to .

    json: <T>(r: Response) => TypedResponse<T>

    Converts a JSON Response to TypedResponse.

    text: (r: Response) => TypedResponse<string>

    Converts a text Response to .

    default: HttpResponseType = ...

    By default, TypedResponse.value conversion methods only assign TypedResponse.value when Response.status === 200

    Methods