zoukankan      html  css  js  c++  java
  • Fiddler 捕获 nodejs 模拟的http请求

    1、设置Fiddler 

        Tools->Options-> Connections

            Allow remote computers to connect:

           

    2、nodejs 请求有多种

        2.1 用https或者http请求

                该种方法貌似需要额外的代理软件监听上图中的8888端口

       2.2 用request 等其他第三方模块

              

    
    
    request({
        method:"GET",
        proxy:'http://127.0.0.1:8888',
        uri:'https://www.howsmyssl.com/a/check',
        "rejectUnauthorized": false, 
        // agentOptions: {//     secureProtocol: 'TLSv1_2_method'
        // },
    },(err,res,body)=>{
        console.log(err)
        console.log(res)
        console.log(111);
    });
    
    

    nodeJS 其他请求模块:

       https://github.com/visionmedia/superagent

      https://github.com/axios/axios

      https://github.com/request/request#tlsssl-protocol-

    https://stackoverflow.com/questions/31673587/error-unable-to-verify-the-first-certificate-in-nodejs

    https://stackoverflow.com/questions/44629256/configure-https-agent-to-allow-only-tls1-2-for-outgoing-requests

  • 相关阅读:
    centos7手动搭建redis集群
    Xshell突破四个窗口限制
    Redis官方集群规范
    Redis官方集群教程
    centos7 更新阿里YUM源
    gitlab配置ssh
    Java前端控制器模式~
    Java数据访问对象模式
    Java组合实体模式~
    Java业务代理模式~
  • 原文地址:https://www.cnblogs.com/cbugs/p/9309109.html
Copyright © 2011-2022 走看看