Module: Faraday::DetailedLogger::CurlFormatter
- Defined in:
- lib/faraday/detailed_logger/curl_formatter.rb
Class Method Summary collapse
- .request(env) ⇒ Object
- .request_body(env) ⇒ Object
- .response(env) ⇒ Object
- .response_body(env) ⇒ Object
Class Method Details
.request(env) ⇒ Object
6 7 8 |
# File 'lib/faraday/detailed_logger/curl_formatter.rb', line 6 def self.request(env) "#{env[:method].upcase} #{env[:url]}" end |
.request_body(env) ⇒ Object
10 11 12 |
# File 'lib/faraday/detailed_logger/curl_formatter.rb', line 10 def self.request_body(env) curl_output(env[:request_headers], env[:body]).inspect end |
.response(env) ⇒ Object
14 15 16 |
# File 'lib/faraday/detailed_logger/curl_formatter.rb', line 14 def self.response(env) "HTTP #{env[:status]}" end |
.response_body(env) ⇒ Object
18 19 20 |
# File 'lib/faraday/detailed_logger/curl_formatter.rb', line 18 def self.response_body(env) curl_output(env[:response_headers], env[:body]).inspect end |