0
こんにちは、私はAngularjsアプリケーションに取り組んでいます。ヘッダにいくつかの項目を渡していますか?私は以下のようなコードを持っています:
$http({
method: 'GET',
url: 'http://api/v1/fund/get?major=true',
headers: {
'Content-Type': 'application/json',
'ApiKey': 'asdsd5369a7c19e34e9b205d6f916837sds90927esdsd80556b959e2ac8a8f3',
'UserAddress': '111.111.5.45'
}
}).success(function (response) {
$scope.data = response.data;
$scope.Temp = response.statusText;;
}).error(function (qwe) {
var temp = qwe.statusText;
});
はあなたがそれをテストしていますか? – libcthorne
ええ、レスポンスはnullです。ヘッダを渡すのは正しいですか?@cthorne –
レスポンスは* null *か* undefined *ですか?はい、それは正しいようです.. https://docs.angularjs.org/api/ng/service/$http – Mico