Questions tagged [httpbuilder]

HTTPBuilder is a wrapper for Apache's HttpClient, with some (actually, a lot of) Groovy syntactical sugar thrown on top. The request/response model is also inspired by Prototype.js' Ajax.Request.

HTTPBuilder wraps Apache's HttpClient, with Groovy syntactical sugar thrown on top.

It handles common tasks such as building and parsing common content-types, handling common content-encodings, and built-in support for common authentication mechanisms. It works equally as well for simple REST-based requests, or ad-hoc web downloads.

The request/response model is inspired by Prototype.js's Ajax.Request.

206 questions
1
vote
3 answers

Issue HTTP PATCH query with groovy HttpBuilder

Groovy HttpBuilder does not support HTTP PATCH method. How can I issue a request using one?
JBaruch
  • 22,610
  • 5
  • 62
  • 90
1
vote
1 answer

Groovy HTTPBuilder POST: missing method(s)

I'm laying the groundwork for a very basic Grails app that integrates with Last.fm. I'm stuck on the user authentication where I get a session key. From the documentation, it sounds like a very simple HTTP POST in the format I have below in code. …
turnerd18
  • 303
  • 3
  • 9
1
vote
1 answer

HTTPBuilder/RESTClient 401 handling

I'm building application using groovy HTTPBuilder and I'm kind of stuck on handling 401. In my app every couple of minutes my authentication cookie gets invalidated (request returns 401) and i have to renew it by requesting some resource (say…
mawek
  • 679
  • 10
  • 19
1
vote
1 answer

Pooling connections with HTTPBuilder

I have a Grails/Groovy application which is making use of the HTTPBuilder library to make calls to our application server. As resource utilization is going up, we are looking for a way to pool our HTTP connections. The only version of HTTPBuilder…
1
vote
1 answer

Grails HttpBuilder URL encoded GET

I want to communicate with a webservice, which has a URL-based API. For example I have the following URL: http://api.bla.com/aaa/bbb.ashx?Action=GetSecurityToken&vendorId=3 I can put the URL into the browser and get a XML page, with all details. I…
dildik
  • 405
  • 6
  • 16
1
vote
0 answers

data = null withRest (rest client) in Grails

I'm having a problem with the HTTPBuilder rest client in grails. Code below: withHttp(uri: "http://uclassify.com") { println "fetching comment sentiments for " + comment.content get(path :…
1
vote
0 answers

Deployment of HTTPBuilder/Rest Plugin in jboss 4.2.2.GA?

I'm not able to use the REST plugin feature of HTTPBuilder to call an http/https link in jboss. As the development was done in grails after creation of war file, it was not able to access the httpBuilder classes as required which are already…
praveen2609
  • 223
  • 1
  • 6
  • 15
1
vote
1 answer

How to pass array for a POST request in HTTPBuilder

The post request code that I use: def http = new HTTPBuilder(uri) http.request(Method.POST, ContentType.TEXT){ send ContentType.URLENC, attrs ..Response handler code... } here attrs is a map with the key&value that needs to be…
Shiva
  • 95
  • 7
0
votes
1 answer

Grails: HTTPBuilder stopped working suddenly

Did not upgrade anything, nothing should have changed, but I may have a silly problem I describe here: Grails: refresh dependencies HTTPBuilder now gives this error when I try to def http = new HTTPBuilder( 'http://google.com/' ) UPDATE: I had the…
Mikey
  • 4,692
  • 10
  • 45
  • 73
0
votes
1 answer

How to post a Facebook Score?

All I want is to do a POST like this: You can post a score or a user by issuing an HTTP POST request to /USER_ID/scores with the app access_token as long as you have the publish_actions permission. Name Description Type …
Diego Faria
  • 8,805
  • 3
  • 26
  • 33
0
votes
1 answer

Sending a file throught a Post with HTTPBuilder in Grails

I am developing a Facebook Application an i wanna send a video file from myServer to Facebbok User`s Timeline. This is the page with the explanation http://developers.facebook.com/blog/post/515/#video_upload but its a PHP code. My app is on Grails,…
Diego Faria
  • 8,805
  • 3
  • 26
  • 33
0
votes
1 answer

HTTPBuilder HTTP Post url encoded parameters and accept xml response?

Hi there i am wondering how i can post a urlencoded string and read in an xml response using HTTPBuilder? I would like to use this inside a Grails application. The REST plugin is no option. I tried the examples given on…
Marco
  • 15,101
  • 33
  • 107
  • 174
0
votes
1 answer

Data binding from JSON on to domain class incorrect for null property when "class" attribute is missing from JSON object

When I try to bind a JSON payload on to an existing domain object that has a nullable reference to another domain object, the binding fails if the in-bound JSON indicates null for the reference. This causes the persistence attempt to fail with this…
cdeszaq
  • 30,869
  • 25
  • 117
  • 173
0
votes
1 answer

Groovy HTTPBuilder SOAP response not being parsed properly

I don't understand why XmlSlurper is apparently not working on the result. import groovyx.net.http.* import static groovyx.net.http.ContentType.* import static groovyx.net.http.Method.* def String WSDL_URL = ... def http = new HTTPBuilder(…
0
votes
0 answers

problem with import groovyx.net.http.HTTPBuilder

I'm trying import groovyx.net.http.HTTPBuilder but I still see "net" in red color with error "Cannot resolve symbol 'net" import groovyx.net.http.HTTPBuilder; static void request(number) { def body = "body body... "; def…
henry58
  • 1
  • 1