Given my API consumers are required to send a customer HTTP header like this:
# curl -H \'X-SomeHeader: 123\' http://127.0.0.1:3000/api/api_call.json
You can define it in get directly.
get
get :api_call, nil, {'HTTP_FOO'=>'BAR'}
I just verified it works in console.