Sha256: 6bb068c99b3e32c4ca023b4f58ee4d5ab9fd520752d94c1f257eae8b4e2ce698
Contents?: true
Size: 403 Bytes
Versions: 12
Compression:
Stored size: 403 Bytes
Contents
module Faraday class Request::Yajl < Faraday::Middleware begin require 'yajl' rescue LoadError, NameError => e self.load_error = e end def call(env) env[:request_headers]['Content-Type'] = 'application/json' if env[:body] && !env[:body].respond_to?(:to_str) env[:body] = Yajl::Encoder.encode env[:body] end @app.call env end end end
Version data entries
12 entries across 12 versions & 1 rubygems