卷曲开机自检未发送数据


Curl POST not sending data

我正在尝试连接到曾经工作的 echosign api,现在突然停止工作,我尝试调试但似乎无法解决它,这是我的代码

  public function get_access_token_get()
  {
    $echoSign = new EchoSign();
    $ch = curl_init('https://secure.echosign.com:443/api/rest/v2/auth/tokens');
    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
    curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($echoSign->echosign_creds));
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
    $result = json_decode(curl_exec($ch));
    curl_close($ch);
    echo "<pre>"; print_r($result); echo "</pre>"; exit();
    return $result->accessToken;
  }

我已经用其他 url 测试了您的 curl 代码,并且它对它们工作正常,然后我尝试使用其他 curl 方法调用您的 url,它给出了空响应,所以我相信您应该检查 echosign 支持以查看出了什么问题。