2

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?

tim_yates
  • 167,322
  • 27
  • 342
  • 338
TTTTTAAOOOO
  • 43
  • 1
  • 6

1 Answers1

0

Fix it. just add one more repo to the BuildConfig:

mavenRepo "http://grails.org/plugins"
Ian Roberts
  • 120,891
  • 16
  • 170
  • 183
TTTTTAAOOOO
  • 43
  • 1
  • 6