I'm trying to access a site via their JSON export.
The URL is: http://neotest.dabbledb.com/publish/neotest/f820728c-4451-41f6-b346-8cba54e52c6f/projects.jsonp
I'm using HTTPBuilder to try and accomplish this in Groovy, but am having trouble. I used the example code from http://groovy.codehaus.org/HTTP+Builder to come up with this:
// perform a GET request, expecting JSON response data
http.request( GET, JSON ) {
url.path = 'publish/neotest/f820728c-4451-41f6-b346-8cba54e52c6f/projects.jsonp'
// response handler for a success response code:
response.success = { resp, json ->
println resp.statusLine
// parse the JSON response object:
json.responseData.results.each {
println " ${it.titleNoFormatting} : ${it.visibleUrl}"
}
}
}
however, when I run the unit test for the method I simply get "No such property: GET for class: ProjectController groovy.lang.MissingPropertyException: No such property: GET for class: ProjectController" which I'm having trouble understanding.