Skip to content

Commit

Permalink
Always log request and response
Browse files Browse the repository at this point in the history
  • Loading branch information
zsand committed Dec 2, 2015
1 parent 2d9b1d2 commit 46b702c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/axiomus_api/session.rb
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,10 @@ def send_request(xml_request)
connection = Net::HTTP.new(AxiomusApi::AXIOMUS_HOST, AxiomusApi::AXIOMUS_PORT)
http_request = get_http_request(xml_request)
logger.info("Request to #{xml_request.mode}")
logger.debug("Request body: #{xml_request.to_xml(true)}")
logger.info("Request body: #{xml_request.to_xml(true)}")
response = connection.request(http_request)
logger.info("Response: #{response.code}")
logger.debug("Response raw: #{response.body}")
logger.info("Response raw: #{response.body}")
response.body.gsub!(/^.*<\?xml/, '<?xml')
response
end
Expand Down

0 comments on commit 46b702c

Please sign in to comment.