I am very newbie for this groovy programming. I have written an API which is running in my local system (localhost:2100
).
Now i want to make a simple GET request to this API using groovy code. I searched a lot for this but i cant find the clear guidance.
I tried for this :
http://www.kellyrob99.com/blog/2013/02/10/groovy-and-http/ http://rest.elkstein.org/2008/02/using-rest-in-groovy.html etc.. But nothing works.
Also i came across HttpBuilder
. I cant get clear idea of this. Please share your ideas.
EDIT:
I tried for this:
def client = new RESTClient("http://localhost:2100");
def res = client.get(path:"xxx/yyy/zzz")
I am receiving error:
Groovy:unable to resolve class RESTClient
Whether I need to add dependency in my pom.xml?