代码如下:
all: function() {
var date = new Date(),
dateStr = date.toUTCString(),
signature = ["GET", "/alizpics/", date.toUTCString(), 0, md5("aliz****")].join("&");
return $http({
method: "GET",
url: 'http://v0.api.upyun.com/alizpics/',
headers: {
"Host": "v0.api.upyun.com",
"Date": dateStr,
"Authorization": " UpYun alichen:" + signature
}
});
}
在chrome中调试始终显示提示Need Date Header