Skip to content

Home

Introduction

Development

Overview

IDEs

Services

Service manager

API Explorer

HttpMethods

HttpMethods is a one-liner class that contains methods for making requests to a web service, either HTTP or SOAP, in Gloop1.

For use in Gloop only

HttpMethods contains Gloop-specific methods; hence, are not recommended for use in Groovy. If you want to send requests in Groovy, use HttpClientMethods instead.

http

The io.toro.integrate.HttpMethods.http(...) method is used for sending RESTful HTTP requests to a web server.

Parameters

Property Type Description
request GloopModel, io.toro.integrate.http.Request A model containing the details of the request. The properties of this model will depend on the requirements of the receiving HTTP endpoint.
auth GloopModel, io.toro.integrate.http.Auth A model containing the authentication information of the request.
returnAs java.lang.String The return type of the response. The response can be an InputStream, String, byte[], or a GloopObject.
responseType java.lang.String The content type of the response obtained; the options are: XML, JSON, or Auto-detect.
throwHttpExceptions java.lang.Boolean Indicates whether an exception should be thrown if the HTTP response code is 5xx.
trackable GloopModel, io.toro.integrate.tracker.Trackable A model indicating the tracking options for the call; will be used by TORO Integrate's Tracker engine.

Return value

This one-liner will return a io.toro.integrate.http.Response Gloop model which will contain the data sent back by the server as a response to the request.

Usage

Sample Gloop service showing how to use the `http(...)` one-liner of `HttpMethods`

The http(...) method requires at least two arguments

The http(...) one-liner requires you to at least provide the method and uri parameters in your request. Otherwise, Gloop will throw an error.

soap

The io.toro.integrate.HttpMethods.soap(...) method is used for sending SOAP requests to a SOAP web server.

Parameters

Property Type Description
url java.lang.String URL of the receiving SOAP web service.
auth GloopModel, io.toro.integrate.http.Auth A model containing the authentication information of the request.
soapAction java.lang.String The name of the SOAP action to call.
style java.lang.String Messaging style of the SOAP Request; it can be either document or RPC.
soapProtocol java.lang.String Indicates the SOAP version to be used.
messageHeader GloopModel Header data to be sent along with the request.
messageBody GloopModel The body of the SOAP message. This is the data inside the <soap:Body></soap:Body> element.
trackable GloopModel, io.toro.integrate.tracker.Trackable A model indicating the tracking options for the call; will be used by TORO Integrate's Tracker engine.

Return value

This one-liner will return a io.toro.integrate.http.Response Gloop model which will contain the data sent back by the server as a response to the request.

Usage

Sample Gloop service showing how to use the `soap(...)` one-liner of `HttpMethods`

Required properties

This method requires you to at least provide the url and soapAction properties in order to send a request successfully.


  1. More specifically, sending requests and mapping their response to models