Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

setHeaders

 
Brett Lewinski
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • 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!
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How are you making the service call?
 
Brett Lewinski
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • 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
Rancher
Posts: 12617
IntelliJ IDE Ruby
 
Brett Lewinski
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • 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.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic