【发布时间】:2015-11-16 10:43:38
【问题描述】:
我会在 http-interceptor 中为方法“request”更改内容类型?
我尝试了以下方法但没有成功:
config.headers[Content-Type] = 'application/json, text/plain';
有解决办法吗?
代码:
'request': function(config) {
config.headers[Content-Type] = 'application/json, text/plain';
return config || $q.when(config);
},
提前感谢您的回答!
【问题讨论】:
标签: angularjs