module HTTP::Status
Represents HTTP
response status code. Defines constants for HTTP
response and some conditional methods.
Constants
- ACCEPTED
- BAD_REQUEST
- CREATED
- FOUND
- INTERNAL
- MOVED_PERMANENTLY
- NON_AUTHORITATIVE_INFORMATION
- NO_CONTENT
- OK
- PARTIAL_CONTENT
- PROXY_AUTHENTICATE_REQUIRED
- REDIRECT_STATUS
Status
codes which is a redirect.- RESET_CONTENT
- SEE_OTHER
- SUCCESSFUL_STATUS
- TEMPORARY_REDIRECT
- UNAUTHORIZED
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 61 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 55 def self.successful?(status) SUCCESSFUL_STATUS.include?(status) end