Sha256: 0548cc0b56877cc44ade91eab015404e9696c097fdb0b3c1c463bf44065bd811

Contents?: true

Size: 332 Bytes

Versions: 18

Compression:

Stored size: 332 Bytes

Contents

module JsonApiClient
  module Middleware
    class JsonRequest < Faraday::Middleware
      def call(environment)
        environment[:request_headers]["Content-Type"] = 'application/vnd.api+json'
        environment[:request_headers]["Accept"] = 'application/vnd.api+json'
        @app.call(environment)
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
json_api_client-1.5.2 lib/json_api_client/middleware/json_request.rb
json_api_client-1.5.1 lib/json_api_client/middleware/json_request.rb
json_api_client-1.5.0 lib/json_api_client/middleware/json_request.rb
json_api_client-1.4.0 lib/json_api_client/middleware/json_request.rb
json_api_client-1.3.0 lib/json_api_client/middleware/json_request.rb
json_api_client-1.2.0 lib/json_api_client/middleware/json_request.rb
json_api_client-1.1.1 lib/json_api_client/middleware/json_request.rb
json_api_client-1.1.0 lib/json_api_client/middleware/json_request.rb
json_api_client-1.0.2 lib/json_api_client/middleware/json_request.rb
json_api_client-1.0.1 lib/json_api_client/middleware/json_request.rb
json_api_client-1.0.0 lib/json_api_client/middleware/json_request.rb
json_api_client-1.0.0.beta7 lib/json_api_client/middleware/json_request.rb
json_api_client-1.0.0.beta6 lib/json_api_client/middleware/json_request.rb
json_api_client-1.0.0.beta5 lib/json_api_client/middleware/json_request.rb
json_api_client-1.0.0.beta4 lib/json_api_client/middleware/json_request.rb
json_api_client-1.0.0.beta3 lib/json_api_client/middleware/json_request.rb
json_api_client-1.0.0.beta2 lib/json_api_client/middleware/json_request.rb
json_api_client-1.0.0.beta lib/json_api_client/middleware/json_request.rb