I use rspec to write a test for my application. For authorization, I send token in the header:
request.headers['token'] = '000000099' get :index
On the controller side, I can read this request.env["HTTP_TOKEN"] value, but env["HTTP_TOKEN"] empty.
What is the difference between them and how can I install env instead of request.env ?
source share