Skip to content

Home

Introduction

Development

Overview

IDEs

Services

Service manager

API Explorer

RestMethods

The RestMethods one-liner class contains methods 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 methods 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 }