Home > @poq/sdk > PoqResponse > from
Method creates PoqResponse from http response.
Signature:
static from<T>(statusCode: number, content: T | null): PoqResponse<T>;
Parameter | Type | Description |
---|---|---|
statusCode | number | |
content | T | null | Typed payload of the response. |
Returns:
PoqResponse<T>
Wrapper request with typed payload.
console.log(PoqResponse.from(httpResponse, typedContent));