#5 ✓resolved
Guilherme Silveira

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

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.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins

People watching this ticket

Tags

Pages