API reference / @backpack/aws-lambda / rest / Body
Interface: Body
Methods
json()
ts
json<T, TOptions>(options?): InferResult<T, TOptions, true>;
Deserializes the JSON representation of the body.
Type Parameters
Type Parameter | Default type |
---|---|
T | - |
TOptions extends Options | Options |
Parameters
Parameter | Type | Description |
---|---|---|
options? | TOptions | Additional options. |
Returns
InferResult
<T
, TOptions
, true
>
Throws
text()
ts
text<TOptions>(options?): InferResult<string, TOptions, true>;
Retrieves the plain text representation of the body.
Type Parameters
Type Parameter |
---|
TOptions extends Options |
Parameters
Parameter | Type | Description |
---|---|---|
options? | TOptions | Additional options. |
Returns
InferResult
<string
, TOptions
, true
>