Exception: WPScan::Error::HTTP
- Defined in:
- lib/wpscan/errors/http.rb
Overview
HTTP Error
Direct Known Subclasses
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
- #failure_details ⇒ Object
-
#initialize(response) ⇒ HTTP
constructor
A new instance of HTTP.
- #to_s ⇒ Object
Constructor Details
#initialize(response) ⇒ HTTP
Returns a new instance of HTTP.
10 11 12 |
# File 'lib/wpscan/errors/http.rb', line 10 def initialize(response) @response = response end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
7 8 9 |
# File 'lib/wpscan/errors/http.rb', line 7 def response @response end |
Instance Method Details
#failure_details ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/wpscan/errors/http.rb', line 14 def failure_details msg = response.effective_url msg += if response.code.zero? || response.timed_out? " (#{response.})" else " (status: #{response.code})" end msg end |
#to_s ⇒ Object
26 27 28 |
# File 'lib/wpscan/errors/http.rb', line 26 def to_s "HTTP Error: #{failure_details}" end |