Skip to main content

http.Body

The body object to be used on POST and PUT requests.

Properties#

payload#

payload: unknown

Defined in: http.ts:28


type#

type: string

Defined in: http.ts:27

Methods#

bytes#

Staticbytes(bytes: number[]): Body

Creates a new byte array body.

Parameters:#

NameType
bytesnumber[]

Returns: Body

The body object ready to be used on the POST and PUT requests.

Defined in: http.ts:76


form#

Staticform(data: Record<string, Part>): Body

Creates a new form data body.

Parameters:#

NameTypeDescription
dataRecord<string, Part>The body data.

Returns: Body

The body object ready to be used on the POST and PUT requests.

Defined in: http.ts:43


json#

Staticjson(data: Record<any, any>): Body

Creates a new JSON body.

Parameters:#

NameTypeDescription
dataRecord<any, any>The body JSON object.

Returns: Body

The body object ready to be used on the POST and PUT requests.

Defined in: http.ts:54


text#

Statictext(value: string): Body

Creates a new UTF-8 string body.

Parameters:#

NameType
valuestring

Returns: Body

The body object ready to be used on the POST and PUT requests.

Defined in: http.ts:65