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
0
votes
1 answer

Mailgun, Groovy HTTPBuilder and problems with HTTP Basic authentication

Looks like HTTPBuilder's behavior goes wrong when the server / api endpoint does not give a proper response. Mailgun's API does not respond 401, but instead gives something else. (Correct me if I'm wrong!) The fact that there are no "Authentication…
tukkaj
  • 596
  • 1
  • 6
  • 16
0
votes
1 answer

Posting XML with Groovy HttpBuilder

i am trying to post some xml data using Groovy's HttpBuilder. POST XML data with Groovy HTTPBuilder answers the question on how to generate attributes (as id below) but does not suggest how to specify value for this node. i…
shwetank
  • 115
  • 3
  • 7
0
votes
1 answer

Grails XML GET Request

I have the following code to get a XML page: withHttp(uri: "PAGE") { get(path : 'PATH', query : [xxx:'xxx']){ resp, xml -> for (AuthToken in xml){ println AuthToken.text() } } …
dildik
  • 405
  • 6
  • 16
0
votes
1 answer

HttpBuilder accessing secured link (i.e. https link)

Can we request a https link using HttpBuilder ? 1 - if yes then is their any specific parameters or properties we need to set while request the data. 2 - if not then can we request same as the normal http link as in the below e.g. def http = new…
praveen2609
  • 223
  • 1
  • 6
  • 15
0
votes
1 answer

Rest plugin: Setting cookie does not work

I want to invoke authenticated URL on server which is SSO authenticated. For this, I am coping cookies which are there in request to HTTPClient. Below code works fine. def cookies = [] request.getCookies().each { def cookie = new…
Jaydeep Patel
  • 2,394
  • 1
  • 21
  • 27
0
votes
1 answer

Groovy Httpbuilder authentication with Realm + RABBIT MQ

I am trying to to make a rabbitmq http api call to know how queues are there and other infos... I need 3 variables to pass on to the api 1) url: (http://localhost:55672/api) 2) username/password: guest/guest 3) realm: "RabbitMQ Management" //i…
0
votes
2 answers

HttpBuilder in grails script

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
0
votes
1 answer

Send messages logged via commons logging (by httpbuilder) to Logback

I am trying to get apache httpclient logs on the console for HTTPBuilder's RESTClient in groovy. I tried various approaches, including the standard instructions and some other suggestions such as this and this, but to no avail. Finally after much…
nonbeing
  • 6,907
  • 6
  • 36
  • 46
-1
votes
1 answer

using httpbuilder for grails restful webservice

I am developing a restful webservice using grails for first time and I following the chapter 13 in the grails documentation for setting up a simple response to a GET request. The thing i do not get is setting up HTTPBuilder for creating a client…
pri_dev
  • 11,315
  • 15
  • 70
  • 122
-1
votes
1 answer

HTTPBuiler error when using ignoreSSLIssues()

I'm running a grails app (Grails 2.5.6 OpenJDK 1.8.0.292) from my local machine (using IntelliJIDEA) and it runs perfectly. The code is as follows :- int THE_TIMEOUT = 4*1000; def http = new HTTPBuilder…
Simon
  • 97
  • 3
  • 13
-1
votes
1 answer

Grails how to write a RESTful post call for my grails application

I am new in writing RESTful calls, and I am also new in Grails. However I am trying to write my first Rest API in my Grails application. Based on this link: http://grails.github.io/grails-doc/3.0.10/guide/webServices.html#versioningResources I…
Ectoras
  • 1,297
  • 3
  • 13
  • 33
1 2 3
13
14