REST.get: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 4: Line 4:
|version=1.5
|version=1.5
|description=
|description=
Get...
Perform an HTTP get request to the specified URL to retrieve a resource or information.


|usage=
|usage=
Line 15: Line 15:
{{param|getFullResponse|Boolean (0:1) to get full response.}}
{{param|getFullResponse|Boolean (0:1) to get full response.}}
'''Returns'''
'''Returns'''
Response as a JSON object.
HTTP response as JSON (if full response) or server response, usually JSON but can be XML, HTML, or other formats.
 


|example=
|example=
TEXT HERE
TEXT HERE
<source lang="mtmacro" line>
<source lang="mtmacro" line>
TEXT HERE
</source>
</source>
Returns:
Returns:

Revision as of 03:52, 16 March 2019

REST.get() Function

 Note: This function can only be used in a Trusted Macro

Introduced in version 1.5
Perform an HTTP get request to the specified URL to retrieve a resource or information.

Usage

REST.get(url, getFullResponse)

Parameters

  • url -
  • getFullResponse - Boolean (0:1) to get full response.

Returns HTTP response as JSON (if full response) or server response, usually JSON but can be XML, HTML, or other formats.

Example

TEXT HERE
TEXT HERE

Returns:

TEXT HERE

See Also

Version Changes

  • 1.5 - Added to main MapTool build.