문제

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.

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top