I am trying to communicate with a RESTful service in Rails. It can return data in different formats, json and xml. Is there a specific way that I can get the data type that I want.
The service mentions that ACCEPT needs to be set in HTTP header. I am not sure how to do that in Ruby.
Currently I'm doing this for get
response = Net::HTTP.get( URI.parse( <url> ) )
I have no idea on how to change the header information for this call. Any help is appreciated. Thanks.