Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/abtris/groovy-rest-examples
REST examples for apiary.io
https://github.com/abtris/groovy-rest-examples
Last synced: about 1 month ago
JSON representation
REST examples for apiary.io
- Host: GitHub
- URL: https://github.com/abtris/groovy-rest-examples
- Owner: abtris
- License: mit
- Created: 2014-02-03T19:57:49.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2014-06-23T12:11:37.000Z (over 10 years ago)
- Last Synced: 2024-04-15T03:04:07.051Z (7 months ago)
- Language: Groovy
- Homepage:
- Size: 230 KB
- Stars: 14
- Watchers: 3
- Forks: 10
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Groovy REST examples
- http://groovy.codehaus.org/modules/http-builder/doc/rest.html
- [API documentation](http://docs.restapi3.apiary.io) at [Apiary](http://apiary.io)## 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](http://groovy.codehaus.org/modules/http-builder/apidocs/groovyx/net/http/ContentType.html) with value [JSON](http://groovy.codehaus.org/modules/http-builder/apidocs/groovyx/net/http/ContentType.html#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"
}
]