grails - import groovyx.net.http.RESTClient in Groovy class -


i try import groovyx.net.http.restclient in groovy class. groovy class 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 { ->         println     }  } 

in class, import restclient this:

    import groovyx.net.http.restclient  

however, got "unable resolve class groovyx.net.http.restclient" error. using netbeans ide 7.4.

i have config buildconfig.groovy following code:

    compile ":rest:0.8" 

and add maven repo:

    mavenrepo "http://repository.codehaus.org/" 

but still can't import restclient. should that?

fix it. add 1 more repo buildconfig:

mavenrepo "http://grails.org/plugins" 

Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -