I'm using the ActiveResource (beta) gem. I need to change the header
fields for the request.
There is "default_header" in ActiveResource::Connection which is
"Content-type: application/xml". I do not see how to change that.
Could someone give me a hint.
There is "default_header" in ActiveResource::Connection which is
"Content-type: application/xml". I do not see how to change that.
Could someone give me a hint.
class Project < ActiveResource::Base
headers['X-Token'] = 'foo'
end
> There is "default_header" in ActiveResource::Connection which is
> "Content-type: application/xml". I do not see how to change that.
> Could someone give me a hint.
class Project < ActiveResource::Base
headers['X-Token'] = 'foo'
end
Adds the X-Token header to all requests.
Thank you for your help. The "headers" methods isn't yet included in
the ActiveResource gem. However, due to your hint, I downloaded at the
SVN sources and it works.
Thank you for your help. The "headers" methods isn't yet included in
the ActiveResource gem. However, due to your hint, I downloaded at the
SVN sources and it works.