Sha256: 94f25bd9605d173c2f29d9d9fb232ea21230d14bb42db03844eeb094ed45282b

Contents?: true

Size: 394 Bytes

Versions: 10

Compression:

Stored size: 394 Bytes

Contents

require 'faraday'

module Faraday
  class Request::Phoenix < Faraday::Middleware
    def call(env)
      # Not sure what what the X-Phx (Phoenix?) header is for but it's
      # required to access certain undocumented resources
      # e.g. GET urls/resolve
      env[:request_headers]['X-Phx'] = 'true'

      @app.call(env)
    end

    def initialize(app)
      @app = app
    end
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
angellist_api-1.0.1 lib/faraday/request/phoenix.rb
angellist_api-0.1.2 lib/faraday/request/phoenix.rb
angellist_api-1.0.0 lib/faraday/request/phoenix.rb
peerindex-0.0.1 lib/faraday/request/phoenix.rb
angellist_api-0.1.0 lib/faraday/request/phoenix.rb
angellist_api-0.0.9 lib/faraday/request/phoenix.rb
angellist_api-0.0.8 lib/faraday/request/phoenix.rb
angellist_api-0.0.7 lib/faraday/request/phoenix.rb
angellist_api-0.0.6 lib/faraday/request/phoenix.rb
angellist_api-0.0.5 lib/faraday/request/phoenix.rb