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

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -