Skip to content
 
 

Latest commit

 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Groovy REST examples

Install groovy

brew install groovy    

Add GROOVY_HOME to .bashrc, .zshrc

export GROOVY_HOME=/usr/local/opt/groovy/libexec

Install dependency (optional)

grape install org.codehaus.groovy.modules.http-builder http-builder 

Content Type in Groovy

In examples using static variable contentType with value JSON.

Get examples

$ groovy get.groovy

Status: 200
Content Type: application/json
Body:
[
    {
        "id": 1,
        "title": "Jogging in park"
    },
    {
        "id": 2,
        "title": "Pick-up posters from post-office"
    }
]

About

REST examples for apiary.io

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages