Skip to content

Toro Cloud Dev Center


Generating HTTP requests for invoking services

Aside from calling services via browser (using the Invoke in Browser option), you can also call services from the HTTP Client. By dragging and dropping the service or API file1 to the HTTP Client view, the request will automatically be generated for you. This is useful for sending requests to the server.

The HTTP Client supports the dragging and dropping of the following items:

Not only will the HTTP client populate your parameters with default values provided in your code, it will also populate headers and authentication data for you.

Use the context menu to invoke services via the HTTP Client

As an alternative to dragging and dropping a file to the HTTP Client, you may right click an invokable item and select Invoke in HTTP Client from the appearing context menu.

Invoke in HTTP Client menu

Default authentication type

When you drag and drop a service to the HTTP Client or use the context menu to invoke a service from it, the request's authentication type is set to Martini session by default.

Default authentication scheme

Invoking a service

To invoke a service:

  1. Drag and drop the service file to the HTTP Client.
  2. Depending on your service and the type of call you want to make, populate the input data required and/or set the authentication.
  3. Click Send.

Invoking a service using the HTTP Client

Invoking a Gloop REST API

You can drag and drop a Gloop REST API file (.api) from the Navigator to the HTTP Client and the HTTP Client will generate a request for every operation exposed in the API.

Aside from files, you can also drag and drop a path or operation node from the Operations tab of the Gloop REST API editor. When you drag and drop a path node, the HTTP Client will generate requests for all operations under that path. When you drag and drop an operation node, the HTTP Client will create a request for invoking that HTTP operation. This allows you to have finer control over which requests will be created.

Invoking a Gloop REST API endpoint using the HTTP Client

Invoking a Gloop REST API endpoint using the HTTP Client

REST APIs may contain multiple paths, and each path may be comprised of multiple operations

Consider these operations from Swagger's Petstore API:

  • POST /pet Add a new pet to the store
  • PUT /pet Update an existing pet
  • GET /pet/findByStatus Find pets by status

You will notice that there are two paths in our list above: /pet and /pet/findByStatus. The /pet/findByStatus path holds only one operation: the operation whose method is GET; but the /pet path has two operations, each respectively under POST and PUT methods.

Set an HTTP request's response code by adding a request parameter named $gloopResponseCode

When the REST API operation you're invoking in the HTTP Client has its Mock property enabled to true, then a $gloopResponseCode query parameter can be added to the generated request in order to set the response code.

Setting response code via `$gloopResponseCode`

Invoking a Gloop SOAP API

You can drag and drop a Gloop SOAP API file (.api) from the Navigator to the HTTP Client and it will generate a request for every operation exposed in the API.

Just like Gloop REST APIs, you can also drag and drop an operation node from the Operations tab of the Gloop SOAP API editor. When you drag and drop an operation node, the HTTP Client will create a request for invoking that HTTP operation. This allows you to have finer control over which requests will be created.

Invoking a Gloop SOAP API endpoint using the HTTP Client

Invoking a Gloop SOAP API endpoint using the HTTP Client

Invoking a Flux service

To invoke a Event Based Workflow service:

  1. Drag and drop the Event Based Workflow service you want to invoke to the HTTP Client.
  2. Populate the necessary inputs of the service which are either in the Parameter or Body tab.
  3. Specify the start state by setting the startState parameter.
  4. Click Send.

Invoking a Event Based Workflow service using the HTTP Client

Invoking a Groovy service

To invoke a Groovy service:

  1. Drag and drop the Groovy file you want to invoke from the Navigator view to the HTTP Client.
  2. Select the method you want to invoke from the service picker. Once done, click OK.
  3. Supply the required inputs of the service.
  4. Click Send.

Invoking a Groovy service using the HTTP Client

You can also create a request to a Groovy service while in the Groovy service editor by clicking the run button beside the method you want to call and then choosing "Invoke '<service>' in HTTP Client".

Invoke in HTTP Client menu


  1. Dragging and dropping of Gloop REST API paths or operations to the HTTP Client is also supported.