Skip to content

Commit

Permalink
Default in an explicit body
Browse files Browse the repository at this point in the history
  • Loading branch information
jonmartindell committed Oct 18, 2016
1 parent 840d60b commit a21a5fd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ quickfix.out

# to keep out api keys and secrets
spec/support/cassettes/**
/vendor
2 changes: 1 addition & 1 deletion lib/cover_my_meds/api_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def request(http_method, host, path, params={}, auth_type = :basic, &block)
request.options.timeout = DEFAULT_TIMEOUT
request.params = params
request.headers.merge! headers
request.body = yield if block_given?
request.body = block_given? ? yield : {}
end
raise Error::HTTPError.new(response.status, response.body, http_method, conn) unless response.success?

Expand Down

0 comments on commit a21a5fd

Please sign in to comment.