Skip to content

Commit

Permalink
Merge pull request #234 from Vonage/revert-229-revert-228-update-type…
Browse files Browse the repository at this point in the history
…-sig-for-json-update-method

Revert "Revert "Add Patch HTTP method as option for http_request in JSON.update type signature""
  • Loading branch information
superchilled authored Jul 1, 2022
2 parents 3438cf4 + b2675cc commit 2ba9f00
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/vonage/json.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module Vonage
module JSON
extend T::Sig

sig { params(http_request: T.any(Net::HTTP::Put, Net::HTTP::Post, Net::HTTP::Get), params: T::Hash[Symbol, T.untyped]).void }
sig { params(http_request: T.any(Net::HTTP::Patch, Net::HTTP::Put, Net::HTTP::Post, Net::HTTP::Get), params: T::Hash[Symbol, T.untyped]).void }
def self.update(http_request, params)
http_request['Content-Type'] = 'application/json'
http_request.body = ::JSON.generate(params)
Expand Down

0 comments on commit 2ba9f00

Please sign in to comment.