You can also use convenient predicate methods like success?
or bad_gateway?
in the following way:
response = HTTParty.post(uri, options) p response.success?
A complete list of possible answers can be found in the constant Net::HTTPResponse::CODE_TO_OBJ
.
Artur Beljajev Jun 22 '16 at 3:17 2016-06-22 03:17
source share