Sha256: c08c65dbe16b04a1a5e4b6df2caaa55a359bbffda3a6328240a9a02d36d72656
Contents?: true
Size: 406 Bytes
Versions: 11
Compression:
Stored size: 406 Bytes
Contents
# frozen_string_literal: true module FinAppsCore module Middleware # This middleware sets the Accept request-header field to specify JSON # as acceptable media type for the response. class AcceptJson < Faraday::Middleware KEY = 'Accept' unless defined? KEY def call(env) env[:request_headers][KEY] = 'application/json' @app.call(env) end end end end
Version data entries
11 entries across 11 versions & 1 rubygems