0
我整合推notification.I具有集成Suceesfully.Only當我面對該問題是:NetworkError:400個BAD REQUEST離子框架
"NetworkError: 400 BAD REQUEST - https://apps.ionic.io/api/v1/app/77c3656e/users/identify"
{"error":"You must specify Content-Type: application/json header"}
我的代碼是如下:
.config(function($httpProvider) {
//$httpProvider.defaults.withCredentials = true;
delete $httpProvider.defaults.headers.common["X-Requested-With"];
$httpProvider.defaults.headers.common["Accept"] = "application/json";
$httpProvider.defaults.headers.common["Content-Type"] = "application/json";
$httpProvider.defaults.headers.common["Content-Type"] = "application/javascript";
$httpProvider.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=utf-8';
})
當我刪除
$httpProvider.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=utf-8'
然後它工作完美。但我的其他Web服務停止工作。然後跨越ori杜松子酒問題來了。