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:45


type#

type: string

Defined in#

http.ts:44

Methods#

bytes#

Static bytes(bytes): 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:93


form#

Static form(data): 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:60


json#

Static json(data): 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:71


text#

Static text(value): 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:82