Sha256: a29d315148f12f2e31a975328ee4b8fd3fda49be5c8a0d88b45da70026979ab8
Contents?: true
Size: 474 Bytes
Versions: 8
Compression:
Stored size: 474 Bytes
Contents
module Oschadbank class Request extend Dry::Initializer::Mixin param :request_url param :request_params def perform response = make_request unless response.status == 200 raise InvalidResponse, "Response status: #{response.status}" end response end private def make_request Faraday.post(request_url, request_params) rescue Faraday::Error => e raise RequestError, e.message end end end
Version data entries
8 entries across 8 versions & 1 rubygems