Class: Samuel::LogEntries::HttpClient
- Inherits:
-
Base
- Object
- Base
- Samuel::LogEntries::HttpClient
show all
- Extended by:
- Forwardable
- Defined in:
- lib/samuel/log_entries/http_client.rb
Instance Method Summary
collapse
Methods inherited from Base
#initialize, #log!
Instance Method Details
#error? ⇒ Boolean
21
22
23
|
# File 'lib/samuel/log_entries/http_client.rb', line 21
def error?
@response.is_a?(Exception) || @response.status.to_s =~ /^(4|5)/
end
|
#method ⇒ Object
9
10
11
|
# File 'lib/samuel/log_entries/http_client.rb', line 9
def method
@request..request_method
end
|
#status_code ⇒ Object
13
14
15
|
# File 'lib/samuel/log_entries/http_client.rb', line 13
def status_code
@response.status
end
|
#status_message ⇒ Object
17
18
19
|
# File 'lib/samuel/log_entries/http_client.rb', line 17
def status_message
@response..reason_phrase.strip
end
|