Displaying 2 results from an estimated 2 matches for "load_attributes_from_response".
2010 Jul 02
3
Ticket #5038 ActiveResource not handling updates correctly
...k doesn''t allow you to
set the Content-Length header of HTTP 204 responses.
The workaround seems to be to return a 200 response with a zero length
Content-Length header and body, but that''s not what the docs say.
The fix is simple and laid out in the ticket, but here it is.
def load_attributes_from_response(response)
if !response[''Conent-Length''].blank? && response[''Content-Length''] !
= "0" && response.body.strip.size > 0
load(self.class.format.decode(response.body))
end
end
This brings up an issue with the HttpMock class includ...
2010 Dec 31
9
Headers in ActiveResource
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