0

I have a problem with the HttpBuilder and grails. If I try to use it in a grails script it doesn't work...how can I import it in a script?
I tried with Grape but it is too slow....is there an alternative?

rascio
  • 8,968
  • 19
  • 68
  • 108

2 Answers2

1

Maybe you could use the Grails Rest plugin. It enables the use of HttpBuilder in a Grails project: http://grails.org/plugin/rest

chozero
  • 411
  • 6
  • 12
0

Specify http-builder dependency in BuildConfig.groovy:

dependencies {
   runtime "org.codehaus.groovy.modules.http-builder:http-builder:0.5.2"
 }
Sergei Shushkevich
  • 1,356
  • 10
  • 14
  • ClassNotFoundError because when the script is executed that JAR isn't loaded yet, I think that a possible solution is to set up the entire application, but I don't like this solution very much... – rascio Jun 07 '12 at 16:18
  • I believe that HttpBuilder classes will available for your script if you specify dependency correctly. – Sergei Shushkevich Jun 07 '12 at 18:46