hyperresource icon indicating copy to clipboard operation
hyperresource copied to clipboard

Content-type application/x-www-form-urlencoded

Open mynameisrufus opened this issue 10 years ago • 0 comments

I think given a response for a resource that has a Content-type: application/json, when you make a PUT or POST to it, it would be nice if it assumed the content type was the same. Currently hyperresource sets the header as Content-type application/x-www-form-urlencoded.

I worked around it by doing this:

HyperResource.new(
  headers: {
    'Accept' => 'application/vnd.trowel-v5+json',
    'Content-Type' => 'application/json'
  }
)

mynameisrufus avatar Mar 16 '15 03:03 mynameisrufus