首页 > 解决方案 > net::ERR_ABORTED 在 page.goto(url) XML

问题描述

我一直卡在发送DELETE请求puppeteer.await

page.goto(url)导致错误“net::ERR_ABORTED at url”。

url 转发到 XML 文件。

POST用同样的方法成功了,但没有用DELETE. 有什么问题?你能给我完整的DELETE请求例子吗?

× 删除 GPD 用户 (5275ms)

● 访问 SCIM › 删除 GPD 用户

net::ERR_ABORTED at url (https://test.dev.com:1234/sandbox-s/users/auth0%7C12345)
 page.on('request', interceptedRequest => {
    var options = { 
        'method': 'DELETE',
        'headers': { 'content-type': 'application/json', 'accept': 'application/json', 'cache-control': 'no-cache', 'authorization': 'Bearer ' + GPD_token},
        'timeout': 10000
    };
    interceptedRequest.continue(options);
}); 
const response = await page.goto(url);
  at navigate (node_modules/puppeteer/lib/FrameManager.js:121:37)
    -- ASYNC --
  at Frame.<anonymous> (node_modules/puppeteer/lib/helper.js:110:27)
  at Page.goto (node_modules/puppeteer/lib/Page.js:629:49)
  at Page.<anonymous> (node_modules/puppeteer/lib/helper.js:111:23)
  at Object.goto [as deleteUser] (src/pages/gpd/scimPage.js:105:33)
  at Object.deleteUser (src/specs/gpd/scim/visit.spec.js:61:37)

谢谢。

标签: urlrequestpuppeteergoto

解决方案


推荐阅读