Sha256: e9673e42a5eee8a28a7992467cc8724740834c73918f3ebe98ec9ffc8b64a521
Contents?: true
Size: 634 Bytes
Versions: 29
Compression:
Stored size: 634 Bytes
Contents
module CirroIOV2 module RequestClients class Base # Interface of all request clients. It returns the response if the request was successful (HTTP::2xx) and # raises a CirroIOV2::HTTPError together with the response if the request was not successful def request(*args, **named_args) response = make_request(*args, **named_args) raise Errors::HTTPError, response unless response.success? response rescue Faraday::ParsingError => e raise Errors::ResponseNotJsonError, e end def make_request(*args) raise NotImplementedError end end end end
Version data entries
29 entries across 29 versions & 1 rubygems