angularjs中取出服务器返回的header中的数据。

$http.post('v1/tickets', "username=123&password=qwe&additionalParam1=paramvalue")
        .success(function(response, status, headers, config) {
            alert("get TGT from server! please check the the property of location from header!");
            console.log(headers("Location"));
        });


版权声明:本文为happy_marvin原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。