Sha256: 53b32f895b3d57401d8b81297ce02c896748acffd8edec122c438c7516b7f0af
Contents?: true
Size: 489 Bytes
Versions: 10
Compression:
Stored size: 489 Bytes
Contents
module RemoteResource module Connection extend ActiveSupport::Concern included do class_attribute :content_type, :default_headers, :extra_headers, instance_accessor: false self.content_type = '.json' self.default_headers = { "Accept" => "application/json" } end module ClassMethods def connection Typhoeus::Request end def headers self.default_headers.merge self.extra_headers || {} end end end end
Version data entries
10 entries across 10 versions & 1 rubygems