我已经按照示例和示例以及所有内容进行了操作,但我正在苦苦挣扎..我正在使用的等效 PHP 代码是:
$url = json_encode($userArray);
$postURL = "https://mysite.com/v4/bulk?api_key=51076b4234e62c7b4ef8e33717a3bce5"; $ch = curl_init($postURL); curl_setopt($ch, CURLOPT_POST, TRUE); curl_setopt ( $ch, CURLOPT_HTTPHEADER, array ( 'Content-Type: application/json')); curl_setopt ($ch, CURLOPT_POSTFIELDS,$url); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, TRUE); $result = curl_exec($ch); $result = json_decode($result, true);
我只是无法让它在 Node.js 中工作。任何帮助将不胜感激。
谢谢。