ByteNote LogoByteNote

Navigation

  • Blog
  • 工具

    © 2025 ByteNote. All rights reserved.

    puppeteer 监测页面是否有API响应

    Apr 4, 20222 min read
    page.on('response', response => {
        const req = response.request()
        console.log(`Response的请求地址:${req.url()},请求方式是:${req.method()}, 请求返回的状态${response.status()},`)
        let message = response.text()
        message.then(function (result) {
            console.log(`返回的数据:${result}`)
        })
    })
    

    相关文章

    Go 语言“可变参数函数”

    Go 语言中的可变参数函数允许通过添加可变参数运算符“…”后缀的方式传入切片,并可动态添加参数。

    Flutter 设置 button的宽高

    在Flutter中,使用SizedBox设置ElevatedButton的宽度和高度分别为100和50。

    "framework"和"dylib"都是在Mac OS X和iOS中用于代码共享的两种主要方式。

    Framework和dylib都是动态共享库,用于代码和资源共享,但框架包含更多资源和高级封装,适合复杂应用,而dylib主要包含代码,适合小型功能。

    Go语言中如何实现接口的多继承?

    Go语言中,通过定义接口并使用关键字“interface”后的大括号“{}”实现多继承,具体通过定义接口A和B,然后定义接口C继承A和B,并实现C中的方法,最后使用实现了接口C的结构体对象调用相关方法。

    Flutter getElementForInheritedwidget0fExactType

    The `getElementForInheritedWidgetOfExactType` method in Flutter is used to access the nearest instance of a specific inherited widget type within the widget tree.