Sha256: ad62072563d9325db79d64726a713b21cf186d1db72575be7b9162aff73b51d8
Contents?: true
Size: 445 Bytes
Versions: 3
Compression:
Stored size: 445 Bytes
Contents
module Rooftop class Headers < Faraday::Middleware def call(env) unless Rooftop.configuration.api_token.nil? env[:request_headers]["Api-Token"] = Rooftop.configuration.api_token end Rooftop.configuration.extra_headers.each do |key,value| env[:request_headers][key.to_s] = value end env[:request_headers]["User-Agent"] = Rooftop.configuration.user_agent @app.call(env) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rooftop-0.0.6 | lib/rooftop/headers.rb |
rooftop-0.0.5 | lib/rooftop/headers.rb |
rooftop-0.0.3 | lib/rooftop/headers.rb |