lib/eps-rapid/client.rb in eps-rapid-1.1.1 vs lib/eps-rapid/client.rb in eps-rapid-1.1.2
- old
+ new
@@ -79,12 +79,12 @@
req['Accept'] = 'application/json'
req['Content-Type'] = 'application/json'
req['Customer-Ip'] = customer_ip if customer_ip != ''
req['Test'] = test_header if test_header != ''
- logger.debug("Request: #{uri.to_s}: #{req.body}")
+ logger.debug("Request: #{uri} headers=(#{req.to_hash}): body=(#{req.body})")
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
- logger.debug("Response: #{response.code.to_i}: #{response.body}")
+ logger.debug("Response: #{response.code.to_i} headers=(#{response.to_hash}): body=(#{response.body})")
case response.code.to_i
when HttpStatusCodes::HTTP_OK_CODE, HttpStatusCodes::HTTP_CREATED_CODE
JSON.parse(response.body)
when HttpStatusCodes::HTTP_NO_CONTENT_CODE