๐ŸŒhttp

Usage:

http.{function}

This table exposes all available HTTP request functions.

circle-exclamation

Options table

This is the table passed as the options argument for the HTTP calls.

headers: table<string> -- Request headers
data: string | nil (Only in POST) -- Sent data
contentType: string | nil (Only in POST) -- Sent content type
asTable: boolean -- Auto converts data from/to strings
saveToFile: string | nil -- Path to a file, useful for binary data

Get

Function Insecure Only

Performs a GET request.

circle-exclamation

Arguments

Name

Type

Description

url

string

The desired URL

options

table

The options table.

callback

function

The callback, gets called with statusCode and data.

Returns

Nothing.

Example


Post

Function Insecure Only

Performs a POST request.

circle-exclamation

Arguments

Name

Type

Description

url

string

The desired URL

options

table

The options table.

callback

function

The callback, gets called with statusCode and data.

Returns

Nothing.

Example


Last updated