Skip to content

Home

Development

IDEs

JAR services

API Explorer

RestFunctions

The Rest class contains functions intended to help you call REST endpoints.

For Groovy

If you would like to execute HTTP requests in Gloop, it is recommended that you create a Gloop HTTP client service instead.

Below is a snippet showing how to use some of the functions in this class:

1
2
3
4
// Assigns the API response to a variable
def jonSnow = null
jonSnow = 'https://anapioficeandfire.com/api/characters/583'.request('GET', ContentType.JSON) {}.getData()
jonSnow = "https://anapioficeandfire.com/api/characters/583".jsonGet() { response, reader -> return reader }