search

Home  >  Q&A  >  body text

javascript - 使用nodejs发get请求时遇到的一个错误

天蓬老师天蓬老师2785 days ago399

reply all(1)I'll reply

  • 大家讲道理

    大家讲道理2017-04-17 16:36:18

    The https protocol requires setting the file location of the public key and private key.

    const options = {
        ...
        key: fs.readFileSync('test/keys/agent-key.pem'),
        cert: fs.readFileSync('test/keys/agent-cert.pem')
    };
    

    soonfy

    reply
    0
  • Cancelreply