brew install groovy
Add GROOVY_HOME
to .bashrc, .zshrc
export GROOVY_HOME=/usr/local/opt/groovy/libexec
grape install org.codehaus.groovy.modules.http-builder http-builder
In examples using static variable contentType with value JSON.
$ 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"
}
]