Module: HTTP::Status
- Defined in:
- lib/rss-client/http-access2/http.rb
Constant Summary collapse
- OK =
200
- CREATED =
201
- ACCEPTED =
202
- NON_AUTHORITATIVE_INFORMATION =
203
- NO_CONTENT =
204
- RESET_CONTENT =
205
- PARTIAL_CONTENT =
206
- MOVED_PERMANENTLY =
301
- FOUND =
302
- SEE_OTHER =
303
- TEMPORARY_REDIRECT =
MOVED_TEMPORARILY = 307
- BAD_REQUEST =
400
- UNAUTHORIZED =
401
- PROXY_AUTHENTICATE_REQUIRED =
407
- INTERNAL =
500
Class Method Summary collapse
Class Method Details
.redirect?(status) ⇒ Boolean
38 39 40 41 42 43 |
# File 'lib/rss-client/http-access2/http.rb', line 38 def self.redirect?(status) [ MOVED_PERMANENTLY, FOUND, SEE_OTHER, TEMPORARY_REDIRECT, MOVED_TEMPORARILY ].include?(status) end |
.successful?(status) ⇒ Boolean
30 31 32 33 34 35 36 |
# File 'lib/rss-client/http-access2/http.rb', line 30 def self.successful?(status) [ OK, CREATED, ACCEPTED, NON_AUTHORITATIVE_INFORMATION, NO_CONTENT, RESET_CONTENT, PARTIAL_CONTENT ].include?(status) end |