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"));
        });

你可能感兴趣的:(angularjs)