
String uri - The URI to make the HTTP POST call toĮxecutes an HTTP PUT request and passes control to the specified closure. Void httpPostJson(Map params, Closure closure) Parameters: Void httpPostJson(String uri, Map body, Closure closure) Void httpPostJson(String uri, String body, Closure closure) The closure is passed one HttpResponseDecorator argument from which the response content and header information can be extracted. Void httpPost(Map params, Closure closure) Parameters:Ĭlosure closure - The closure that will be called with the response of the request.Įxecutes an HTTP POST request with a JSON-encoded body and content type, and passes control to the specified closure. Void httpPost(String uri, String body, Closure closure)

String uri - The URI to make the HTTP GET call toĬlosure - closure - The closure that will be called with the response of the request.Įxecutes an HTTP POST request and passes control to the specified closure. Void httpGet(Map params, Closure closure) Parameters: Void httpGet(String uri, Closure closure) If the response content type is JSON, the response data will automatically be parsed into a data structure. Returns: voidĮxecutes an HTTP DELETE request and passes control to the specified closure. Request body that will be encoded based on the given contentType.Ĭlosure closure - The closure that will be called with the response of the request.

Request path that is merged with the URI.įorced response content type and request Accept header.Ĭontent type for the request, if it is different from the expected response content-type. The valid parameters are: ParameterĮither a URI or URL of of the endpoint to make a request from. Map params - A map of parameters for configuring the request. String uri - The URI to make the HTTP DELETE call to. Void httpDelete(Map params, Closure closure) Parameters: Void httpDelete(String uri, Closure closure) Executes an HTTP DELETE request and passes control to the specified closure.
