Domanda

below code:

def http = new HTTPBuilder( 'http://twitter.com/statuses/' )

http.get( path: 'user_timeline.json', 
    query: [id:'httpbuilder', count:5] ) { resp, json ->

    println resp.status

    json.each {  // iterate over JSON 'status' object in the response:
        println it.created_at
        println '  ' + it.text
    }
}

Why get exception? I use the same code from http://groovy.codehaus.org/modules/http-builder/doc/json.html, it should works.

È stato utile?

Soluzione

It's IDE's problem, Eclipse groovy plugin not works very well.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top