Tag: 节点libcurl

node-libcurl在POST上获取错误的IP地址

我是新来的nodejs,所以这可能是运营商错误,但我试图做一个POST请求PayPay的testingurl。 我尝试在nodejs中使用http请求,但得到了一个奇怪的回应。 我能够让命令行上的curl工作,所以我想我会在节点中使用curl。 当我在bash中运行下面的curl命令时,它工作: curl -v –data "USER=myLogin&VENDOR=myLogin&PARTNER=PayPal&PWD=QQQQQQQQQ&CREATESECURETOKEN=Y&SECURETOKENID=fb7810e9-252b-4613-a53b-6432148bfd97&TRXTYPE=S&AMT=100.00" https://pilot-payflowpro.paypal.com 我得到了以下结果(我知道使用了安全令牌,但它是curl调用工作的一个标志): * Rebuilt URL to: https://pilot-payflowpro.paypal.com/ * Trying 173.0.82.163… * Connected to pilot-payflowpro.paypal.com (173.0.82.163) port 443 (#0) * found 173 certificates in /etc/ssl/certs/ca-certificates.crt * found 704 certificates in /etc/ssl/certs * ALPN, offering http/1.1 * SSL connection using TLS1.2 / RSA_AES_256_CBC_SHA256 * server certificate verification OK * […]