【问题标题】:How to get server response headers in Zombie.js如何在 Zombie.js 中获取服务器响应标头
【发布时间】:2015-05-28 06:27:41
【问题描述】:

当对页面发出请求时,服务器会将标头作为响应的一部分发回。

有人如何在 Zombie.js 中从服务器访问响应标头?

【问题讨论】:

    标签: zombie.js


    【解决方案1】:

    响应对象在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();
    });
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-07-05
      • 2023-03-04
      • 2016-06-04
      • 2021-10-27
      • 2021-08-29
      相关资源
      最近更新 更多