We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 017c72c commit 5ebe59dCopy full SHA for 5ebe59d
1 file changed
lib/lithic/internal/transport/base_client.rb
@@ -306,7 +306,10 @@ def initialize(
306
Lithic::Internal::Util.deep_merge(*[req[:body], opts[:extra_body]].compact)
307
end
308
309
- headers.delete("content-type") if body.nil?
+ # Generated methods always pass `req[:body]` for operations that define a
310
+ # request body, so only elide the content-type header when the operation
311
+ # has no body at all, not when an optional body param was omitted.
312
+ headers.delete("content-type") if body.nil? && !req.key?(:body)
313
314
url = Lithic::Internal::Util.join_parsed_uri(
315
@base_url_components,
0 commit comments