Sha256: 959a729645a16082297fb659947029e515f4e9939912b23ea9adcb9fd7ba88aa
Contents?: true
Size: 507 Bytes
Versions: 11
Compression:
Stored size: 507 Bytes
Contents
# frozen_string_literal: true module Ika3 class Response def initialize(faraday_response) @raw_body = faraday_response.body @raw_headers = faraday_response.headers @raw_status = faraday_response.status end def body @raw_body end def headers @headers ||= @raw_headers.inject({}) do |result, (key, value)| result.merge(key.split('-').map(&:capitalize).join('-') => value) end end def status @raw_status end end end
Version data entries
11 entries across 11 versions & 1 rubygems