Skip to content

abtris/groovy-rest-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages