restfulie client currently assumes that both request and response contains the same mime type
Reported by Guilherme Silveira | April 3rd, 2010 @ 08:22 PM | in v0.7
The request method expects that the response is of the same media type as the request, while it could be something different:
def request!(method, path, *args)
representation = do_conneg_and_choose_representation(method, path, *args)
return super(method, path, *args) unless representation
if has_payload?(method, path, *args)
payload = get_payload(method, path, *args)
payload = representation.marshal(payload)
args = set_marshalled_payload(method, path, payload, *args)
end
args = add_representation_headers(method, path, representation, *args)
response = super(method, path, *args)
if @raw
response
else
unmarshalled = representation.unmarshal(response.body)
unmarshalled.extend(ResponseHolder)
unmarshalled.response = response
unmarshalled
end
end
Comments and changes to this ticket
-
Guilherme Silveira April 6th, 2010 @ 12:51 PM
- Assigned user set to Guilherme Silveira
- Milestone set to v0.7
working on it
-
Guilherme Silveira April 6th, 2010 @ 01:20 PM
- State changed from new to open
Implemented. Problem with partial testing.
http://github.com/caelum/restfulie/commits/request_and_response_media
-
Guilherme Silveira April 7th, 2010 @ 12:24 PM
- State changed from open to resolved
Test implemented
http://github.com/caelum/restfulie/tree/request_and_response_media
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »