mirror of
https://github.com/tauri-apps/tauri-docs.git
synced 2026-01-31 00:35:16 +01:00
2.2 KiB
2.2 KiB
@tauri-apps/api / http / Body
Class: Body
http.Body
The body object to be used on POST and PUT requests.
Properties
payload
• payload: unknown
Defined in
type
• type: string
Defined in
Methods
bytes
▸ Static bytes(bytes): Body
Creates a new byte array body.
Parameters
| Name | Type |
|---|---|
bytes |
Uint8Array |
Returns
The body object ready to be used on the POST and PUT requests.
Defined in
form
▸ Static form(data): Body
Creates a new form data body.
Parameters
| Name | Type | Description |
|---|---|---|
data |
Record<string, Part> |
The body data. |
Returns
The body object ready to be used on the POST and PUT requests.
Defined in
json
▸ Static json(data): Body
Creates a new JSON body.
Parameters
| Name | Type | Description |
|---|---|---|
data |
Record<any, any> |
The body JSON object. |
Returns
The body object ready to be used on the POST and PUT requests.
Defined in
text
▸ Static text(value): Body
Creates a new UTF-8 string body.
Parameters
| Name | Type |
|---|---|
value |
string |
Returns
The body object ready to be used on the POST and PUT requests.