HTTPRequest Structure

From Garry's Mod
Jump to: navigation, search
Table used by HTTP function.

Type Name Description
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
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"

Personal tools