Ruby on Rails Tuesday, January 4, 2011

Does active resource support setting headers on the model object
rather then on the model class?
That would solve the issue, but looking thought the active resource
code does not seem that it's available.

Any good reason why should the option of setting headers per object
not be supported/provided/available?

Dmitry


On Jan 4, 9:54 am, ken <ken.mccrac...@gmail.com> wrote:
> I am faced with the exact same scenario, an OAuth authentication is
> accepted on a request and needs to be used on an ActiveResource lookup
> call to a RESTful API, that itself requires the appropriate
> authentication header to be set, possibly different for each HTTP
> request.  This seems to me to be a legitimate and possibly popular way
> to use ActiveResource in the development community.
>
> I don't have a workaround yet, I am hoping my post raises awareness.
>
> Thanks,
> -Ken
>
> On Dec 31 2010, 2:58 am, Tom <tomjmal...@gmail.com> wrote:
>
>
>
>
>
>
>
> > I am creating a rails app that is a gui wraping a restful web service
> > that uses a websso for authentication. This websso sets a series of
> > headers that I need to pass from the request to the
> > ActiveResource.find methods. As this is stuff like username etc it is
> > going to be different for each request. I can find examples on how to
> > set headers for all requests not just one.
>
> > Does anyone know of a way of doing this
>
> > Thanks in advance
>
> > Tom

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment