Overview
Catchpoint supports different methods in API monitoring. This article has information on how to implement requests by adding an extra parameter to the open verb, and pass along data parameters
Methods Supported
GET
When the open verb is used, by default it performs a GET. This requests data from a specified resource.
Syntax:
open("http://www.domain.com")
HEAD
This is the same as a GET request, but only transfers the header section of the request.
*Syntax: *
open("http://www.domain.com", "HEAD")
POST
To change the method to perform a POST, add SetNavigatePostData. This submits data to be processed to a specified resource.
Syntax:
Open("http://www.domain.com")
SetNavigatePostData("dataset")
Note: You can also pass the second parameter to the open verb, such as DELETE or PUT.
DELETE
The DELETE method requests that the origin server delete the resource identified in the Request-URI. A successful response should be 200 (OK) if the response includes an entity describing the status, 202 (Accepted) if the action has not yet been enacted, or 204 (No Content) if the action has been enacted but the response does not include an entity.
Syntax:
Open("http://www.domain.com", "DELETE")
PUT
The PUT method requests that the included entity be stored under the supplied Request-URI. If the Request-URI refers to an already-existing resource, the included entity should be considered as a modified version of the one residing on the origin server, and should replace (update or modify) the existing resource. If the Request-URI does not point to an existing resource, and that URI is capable of being defined as a new resource by the requesting user agent, the origin server can create the resource with that URI. If a new resource is created, the origin server should inform the user agent via the 201 (Created) response. If an existing resource is modified, either the 200 (OK) or 204 (No Content) response codes should be sent to indicate successful completion of the request. If the resource could not be created or modified with the Request-URI, an appropriate error response should be given that reflects the nature of the problem.
Syntax:
Open("http://www.domain.com","PUT")
SetNavigatePostData("dataset")