币安 binance API 接口出现 400 ERROR The request could not be satisfied.

yufei       4 年, 1 月 前       2085

这个错误貌似只有 PHP 才会出现,这个错误的全部是

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>ERROR: The request could not be satisfied</TITLE>
</HEAD><BODY>
<H1>400 ERROR</H1>
<H2>The request could not be satisfied.</H2>
<HR noshade size="1px">
Bad request.
We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner.
<BR clear="all">
If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.
<BR clear="all">
<HR noshade size="1px">
<PRE>
Generated by cloudfront (CloudFront)
Request ID: PZP04VdVnO7GN5Li5xD9F6VaSfUxH9sCFGW-Bgzn8T4gq3D8mZls3g==
</PRE>
<ADDRESS>
</ADDRESS>
</BODY></HTML>  

错误的愿意呢,很简单,就是 POST 的时候忘记设置 body 了

curl_setopt($ch, CURLOPT_POSTFIELDS,'');

全部就是

if ($this->req_method == 'POST') {
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS,'');
} else if($this->req_method == 'DELETE'){
    curl_setopt ($ch, CURLOPT_CUSTOMREQUEST, "DELETE");
}
目前尚无回复
简单教程 = 简单教程,简单编程
简单教程 是一个关于技术和学习的地方
现在注册
已注册用户请 登入
关于   |   FAQ   |   我们的愿景   |   广告投放   |  博客

  简单教程,简单编程 - IT 入门首选站

Copyright © 2013-2022 简单教程 twle.cn All Rights Reserved.