Skip to content

Instantly share code, notes, and snippets.

@jwagenleitner
Last active October 26, 2016 23:17
Show Gist options
  • Save jwagenleitner/f07dc306c7798a3fe9ef to your computer and use it in GitHub Desktop.
Save jwagenleitner/f07dc306c7798a3fe9ef to your computer and use it in GitHub Desktop.
Using groovy-wslite SNAPSHOT from the Groovy Console
@GrabResolver(name='groovy-wslite', root='https://oss.sonatype.org/content/groups/public', m2Compatible=true)
@Grab(group='com.github.groovy-wslite', module='groovy-wslite', version='2.0.0-SNAPSHOT', changing=true)
import wslite.rest.*
RESTClient github = new RESTClient('https://api.github.com/')
def response = github.get(path: 'users/jwagenleitner')
assert 'jwagenleitner' == response.json.login
Wed Oct 26 16:17:12 PDT 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment