• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

setHeaders

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am new to groovy and I am trying to call a RESTful service. This service requires the setting of remote_user in the header. I am not having much success in getting this set. Has anyone done this before and I would appreciate any guidance or samples.

Thanks in advance!
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How are you making the service call?
 
Brett Lewinski
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
David -

Thanks for the reply! Since I am new to groovy I found a sample service call to Google and I have been modifying it for what I need. I am actually trying to create this as a portlet for one of our portals; the portlet will allow a user to search our Service Bus and get some results displayed back in the portlet. Any thoughts or guidance in this area would be appreciated as well!

Here is my code so far:

 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
http://groovy.codehaus.org/HTTP+Builder
 
Brett Lewinski
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
David -

Not sure how I missed that page, thanks for the link.

I think I have the header set, how can I verify it is set? I tried using request.getAllHeader() to show what is in it but it looks empty.

reply
    Bookmark Topic Watch Topic
  • New Topic