Class: Wreq::StatusCode
- Inherits:
-
Object
- Object
- Wreq::StatusCode
- Defined in:
- lib/wreq_ruby/http.rb,
lib/wreq_ruby/http.rb
Instance Method Summary collapse
-
#==(other) ⇒ Boolean
Value-based equality.
-
#as_int ⇒ Integer
Returns the status code as an integer.
-
#client_error? ⇒ Boolean
Checks if status code indicates client error (4xx).
-
#eql?(other) ⇒ Boolean
Strict equality for Hash key and Set member semantics.
-
#hash ⇒ Integer
Hash value consistent with #eql? for use as Hash keys.
-
#informational? ⇒ Boolean
Checks if status code is informational (1xx).
- #inspect ⇒ Object
-
#redirection? ⇒ Boolean
Checks if status code indicates redirection (3xx).
-
#server_error? ⇒ Boolean
Checks if status code indicates server error (5xx).
-
#success? ⇒ Boolean
Checks if status code indicates success (2xx).
-
#to_i ⇒ Integer
Returns the status code as an integer.
-
#to_s ⇒ String
Returns a string representation of the status code.
Instance Method Details
#==(other) ⇒ Boolean
Value-based equality. Only compares with other StatusCode instances.
205 206 |
# File 'lib/wreq_ruby/http.rb', line 205 def ==(other) end |
#as_int ⇒ Integer
Returns the status code as an integer.
144 145 |
# File 'lib/wreq_ruby/http.rb', line 144 def as_int end |
#client_error? ⇒ Boolean
Checks if status code indicates client error (4xx).
Client error responses indicate that the request contains bad syntax or cannot be fulfilled.
180 181 |
# File 'lib/wreq_ruby/http.rb', line 180 def client_error? end |
#eql?(other) ⇒ Boolean
Strict equality for Hash key and Set member semantics.
211 212 |
# File 'lib/wreq_ruby/http.rb', line 211 def eql?(other) end |
#hash ⇒ Integer
Hash value consistent with #eql? for use as Hash keys.
216 217 |
# File 'lib/wreq_ruby/http.rb', line 216 def hash end |
#informational? ⇒ Boolean
Checks if status code is informational (1xx).
Informational responses indicate that the request was received and the process is continuing.
153 154 |
# File 'lib/wreq_ruby/http.rb', line 153 def informational? end |
#inspect ⇒ Object
224 225 226 |
# File 'lib/wreq_ruby/http.rb', line 224 def inspect "#<Wreq::StatusCode #{self}>" end |
#redirection? ⇒ Boolean
Checks if status code indicates redirection (3xx).
Redirection responses indicate that further action needs to be taken to complete the request.
171 172 |
# File 'lib/wreq_ruby/http.rb', line 171 def redirection? end |
#server_error? ⇒ Boolean
Checks if status code indicates server error (5xx).
Server error responses indicate that the server failed to fulfill a valid request.
189 190 |
# File 'lib/wreq_ruby/http.rb', line 189 def server_error? end |
#success? ⇒ Boolean
Checks if status code indicates success (2xx).
Success responses indicate that the request was successfully received, understood, and accepted.
162 163 |
# File 'lib/wreq_ruby/http.rb', line 162 def success? end |
#to_i ⇒ Integer
Returns the status code as an integer.
199 200 |
# File 'lib/wreq_ruby/http.rb', line 199 def to_i end |
#to_s ⇒ String
Returns a string representation of the status code.
194 195 |
# File 'lib/wreq_ruby/http.rb', line 194 def to_s end |