Revision Difference
Structures/HTTPRequest#549895
<cat>struct</cat>
<structure>
<realm>Shared</realm>⤶
<realm>Shared and Menu</realm>⤶
<description>Table used by <page>Global.HTTP</page> function.</description>
<fields>
<item name="failed" type="function">Function to be called on failure. Arguments are
* <page>string</page> reason
</item>
<item name="success" type="function">Function to be called on success. Arguments are
* <page>number</page> code
* <page>string</page> body
* <page>table</page> headers
</item>
<item name="method" type="string">Request method, case insensitive. Possible values are:
* GET
* POST
* HEAD
* PUT
* DELETE
* PATCH
* OPTIONS
</item>
<item name="url" type="string">The target url</item>
<item name="parameters" type="table">KeyValue table for parameters. This is only applicable to the following request methods:
* GET
* POST
* HEAD
</item>
<item name="headers" type="table">KeyValue table for headers</item>
<item name="body" type="string">Body string for POST data. If set, will override parameters</item>
<item name="type" type="string" default="text/plain; charset=utf-8">Content type for body.</item>
<item name="timeout" type="number" default="60">The timeout for the connection.</item>
</fields>
</structure>