Represents HTTP response status code. Defines constants for HTTP response and some conditional methods.
Status codes which is a redirect.
Returns true if the given status is thought to be redirect. See also REDIRECT_STATUS.
# File lib/httpclient/http.rb, line 60 def self.redirect?(status) REDIRECT_STATUS.include?(status) end
Returns true if the given status represents successful HTTP response. See also SUCCESSFUL_STATUS.
# File lib/httpclient/http.rb, line 54 def self.successful?(status) SUCCESSFUL_STATUS.include?(status) end