I want to use http in angularjs to send a request to the backend. The backend is based on tornado. Now there is a token uniquely recognized by the user that I want to put in the headers, which is {headres:{'token':1}}, But I have tried many methods but it doesn’t work. I would like to ask what should be done. Do I need to set up something in the background? Thank you
Routing configuration
$httpProvider.defaults.headers.post['token'] = '123';
Place the following interceptors in config
But why use headers, cookies, and request parameters?
Has it been solved? I have this problem