module Seahorse::Client::NetHttp::Patches::PatchDefaultContentType
For requests with bodies, Net::HTTP sets a default content type of:
'application/x-www-form-urlencoded'
There are cases where we should not send content type at all. Even when no body is supplied, Net::HTTP uses a default empty body and sets it anyway. This patch disables the behavior when a Thread local variable is set.
Public Instance Methods
Source
# File lib/seahorse/client/net_http/patches.rb, line 24 def supply_default_content_type return if Thread.current[:net_http_skip_default_content_type] super end
Calls superclass method