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 f34c0c6 commit 91e4d6aCopy full SHA for 91e4d6a
lib/openstax/payments/api/real_client.rb
@@ -69,10 +69,10 @@ def absolutize_url(url)
69
Addressable::URI.join @server_url, url.to_s
70
end
71
72
- def api_request(method:, url:, body: {})
+ def api_request(method:, url:, body: nil)
73
absolute_uri = absolutize_url(url)
74
75
- request_options = HEADER_OPTIONS.merge({ body: body.to_json })
+ request_options = HEADER_OPTIONS.merge(body.nil? ? {} : { body: body.to_json })
76
77
begin
78
num_retries ||= 0
0 commit comments