REST.delete: Difference between revisions
Jump to navigation
Jump to search
(Created page with "{{MacroFunction |name=REST.delete |trusted=true |version=1.5 |description= Perform an HTTP delete request to the specified URL to delete the specified resource. |usage= <sour...") |
(No difference)
|
Revision as of 04:21, 16 March 2019
REST.delete() Function
Note: This function can only be used in a Trusted Macro
• Introduced in version 1.5
Perform an HTTP delete request to the specified URL to delete the specified resource.
Usage
REST.delete(url, getFullResponse)
REST.delete(url, headers, getFullResponse)
Parameters
url
-headers
-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
Delete the indicated resource.
[h: baseURL = "https://reqres.in"]
[h: path = "/api/users/2"]
[r: response = REST.delete(baseURL + path, 1)]
<br><br>
[r: response = REST.delete(baseURL + path, 0)]
Returns:
TEXT HERE
See Also
Version Changes
- 1.5 - Added to main MapTool build.