未捕获 Autodesk\Forge\Client\ApiException:[504] 连接到 API phpSDK 时出错

Uncaught Autodesk\Forge\Client\ApiException: [504] Error connecting to the API phpSDK

我已经用过了 来自:

curl_setopt($curl, CURLOPT_POSTFIELDS, $postData);

至:

curl_setopt($curl, CURLOPT_POSTFIELDS, file_get_contents($postData));

并尝试添加

curl_setopt($curl, CURLOPT_FORBID_REUSE, 1);
curl_setopt($curl, CURLOPT_ENCODING , "");

有人知道如何解决这个问题吗?

我建议使用 this repo 的源代码,它使用 curl_setopt($curl, CURLOPT_POSTFIELDS, $postData);

现在,如果您在处理一项特定请求时遇到问题,请将其添加到您的问题中。