Class: Mayak::Http::Response
- Inherits:
-
T::Struct
- Object
- T::Struct
- Mayak::Http::Response
- Extended by:
- T::Sig
- Defined in:
- lib/mayak/http/response.rb
Constant Summary collapse
- SuccessfulStatuses =
T.let(::Set.new(200..299).freeze, T::Set[Integer])
- StatusesWithoutBody =
T.let(::Set.new([204, 304]).freeze, T::Set[Integer])
Instance Method Summary collapse
Instance Method Details
#failure? ⇒ Boolean
24 25 26 |
# File 'lib/mayak/http/response.rb', line 24 def failure? !success? end |
#success? ⇒ Boolean
19 20 21 |
# File 'lib/mayak/http/response.rb', line 19 def success? SuccessfulStatuses.include?(status) end |