bodiam
06/30/2016, 1:01 AMstatic String shorten(String url) {
String encoded = URLEncoder.encode(url, "UTF-8")
def result = new JsonSlurper().parse(new URL("<https://api-ssl.bitly.com/v3/shorten?access_token=123&longUrl=$encoded>"))
return result.data.url.toString()
}