Garry's Mod Wiki

HTTPRequest

Description

Table used by HTTP function.

Parameters

function failed
Function to be called on failure. Arguments are

function success
Function to be called on success. Arguments are

string method
Request method, case insensitive. Possible values are:

  • GET
  • POST
  • HEAD
  • PUT
  • DELETE
  • PATCH
  • OPTIONS
string url
The target url
table parameters
KeyValue table for parameters. This is only applicable to the following request methods:

  • GET
  • POST
  • HEAD
table headers
KeyValue table for headers
string body
Body string for POST data. If set, will override parameters
string type
Content type for body.

Default: "text/plain; charset=utf-8"

number timeout
The timeout for the connection.

Default: 60