Class: Request::Phoenix
- Inherits:
-
Faraday::Middleware
- Object
- Faraday::Middleware
- Request::Phoenix
- Defined in:
- lib/faraday/request/phoenix.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app) ⇒ Phoenix
constructor
A new instance of Phoenix.
Constructor Details
#initialize(app) ⇒ Phoenix
Returns a new instance of Phoenix.
14 15 16 |
# File 'lib/faraday/request/phoenix.rb', line 14 def initialize(app) @app = app end |
Instance Method Details
#call(env) ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/faraday/request/phoenix.rb', line 5 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 |