Class: Twitter::Request::Phoenix
- Inherits:
-
Faraday::Middleware
- Object
- Faraday::Middleware
- Twitter::Request::Phoenix
- Defined in:
- lib/twitter/request/phoenix.rb
Instance Method Summary (collapse)
- - (Object) call(env)
-
- (Phoenix) initialize(app)
constructor
A new instance of Phoenix.
Constructor Details
- (Phoenix) initialize(app)
A new instance of Phoenix
16 17 18 |
# File 'lib/twitter/request/phoenix.rb', line 16 def initialize(app) @app = app end |
Instance Method Details
- (Object) call(env)
7 8 9 10 11 12 13 14 |
# File 'lib/twitter/request/phoenix.rb', line 7 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' if env[:request][:phoenix] @app.call(env) end |