Class/Module Index [+]

Quicksearch

HTTP::Status

Represents HTTP response status code. Defines constants for HTTP response and some conditional methods.

Public Class Methods

redirect?(status) click to toggle source

Returns true if the given status is thought to be redirect. See also REDIRECT_STATUS.

# File lib/httpclient/http.rb, line 59
def self.redirect?(status)
  REDIRECT_STATUS.include?(status)
end
successful?(status) click to toggle source

Returns true if the given status represents successful HTTP response. See also SUCCESSFUL_STATUS.

# File lib/httpclient/http.rb, line 53
def self.successful?(status)
  SUCCESSFUL_STATUS.include?(status)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.