lib/httpi/response.rb in httpi-2.2.4 vs lib/httpi/response.rb in httpi-2.2.5
- old
+ new
@@ -12,9 +12,11 @@
# Represents an HTTP response and contains various response details.
class Response
# Range of HTTP response codes considered to be successful.
SuccessfulResponseCodes = 200..299
+ # HTTP response codes considered to be a redirect.
+ RedirectResponseCodes = [301, 302, 303, 307, 308]
# Initializer expects an HTTP response +code+, +headers+ and +body+.
def initialize(code, headers, body)
self.code = code.to_i
self.headers = Rack::Utils::HeaderHash.new(headers)