KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
For instance, in the RestClient console: RestClient.post 'http://localhost:5001', {:a => 'b'}, :content_type => 'application/json' This does not send application/json as the content type. Instead I see: Content-Type: application/x-www-form-urlencoded I was able to trace the change to restclient/payload.rb: class UrlEncoded < Base ... def headers super.merge({'Content-Type' => 'application/x-www-form-urlencoded'}) end end Replacing super.merge with super causes the content type to be respected, but obviously that's not a real solution. Does anyone know the proper way to fix this? Thanks.
Tags (comma-separated)
Save Edits
Cancel