I try to import groovyx.net.http.RESTClient in my groovy class. My groovy class is like this:
void getREST() {
def r = new RESTClient(url)
def response = r.get(path:'test',headers:['Authorization': "auth"] )
println "RESPONSE"
println response.headers
response.headers.each { it ->
println it
}
}
In my class, i import the RESTClient like this:
import groovyx.net.http.RESTClient
However, i got "unable to resolve class groovyx.net.http.RESTClient" error. I am using NetBeans IDE 7.4.
I have already config the BuildConfig.groovy with the following code:
compile ":rest:0.8"
and add the maven repo:
mavenRepo "http://repository.codehaus.org/"
But I still can't import the RESTClient. What should I do with that?