当发出页面请求时,服务器会发送回 header 作为响应的一部分。
某人如何从 Zombie.js 中的服务器访问响应 header ?
最佳答案
响应对象位于browser.resources
下。
Documentation on browser.resources
一个例子
browser.visit('http://localhost:8080/index.html', function(err) {
if(err) throw err;
console.log(browser.resources['0'].response.headers);
done();
});
关于zombie.js - 如何在 Zombie.js 中获取服务器响应 header ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30494174/