Poq.SDK.Node

Home > @poq/sdk > PoqResponse > from

PoqResponse.from() method

Method creates PoqResponse from http response.

Signature:

static from<T>(statusCode: number, content: T | null): PoqResponse<T>;

Parameters

Parameter Type Description
statusCode number  
content T | null Typed payload of the response.

Returns:

PoqResponse<T>

Wrapper request with typed payload.

Example

console.log(PoqResponse.from(httpResponse, typedContent));