Функция
возвращает ошибку:
<html>
<head><title>400 The plain HTTP request was sent to HTTPS port</title></head>
<body>
<center><h1>400 Bad Request</h1></center>
<center>The plain HTTP request was sent to HTTPS port</center>
<hr><center>cloudflare</center>
</body>
</html>
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
Это один из множества вариантов что пробовал, перечитал форум, мучил GPT, но ничего не помогает. Помогите пожалуйста.
Код:
Func _credit_info($access_id, $tonce, $authorization)
Local $url = "https://api.coinex.com/v1/credit/info"
Local $postData = '?access_id=' & $access_id & '&tonce=' & $tonce
Local $hOpen = _WinHttpOpen()
Local $hConnect = _WinHttpConnect($hOpen, "api.coinex.com", 443) ; Используем порт 443 для HTTPS
Local $hRequest = _WinHttpOpenRequest($hConnect, "GET", "/v1/credit/info" & $postData)
_WinHttpAddRequestHeaders($hRequest, "Content-Type: application/json")
_WinHttpAddRequestHeaders($hRequest, "User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36")
_WinHttpAddRequestHeaders($hRequest, "Authorization: " & $authorization)
_WinHttpSendRequest($hRequest)
_WinHttpReceiveResponse($hRequest)
Local $sResponse = _WinHttpReadData($hRequest)
Return $sResponse
EndFunc
возвращает ошибку:
<html>
<head><title>400 The plain HTTP request was sent to HTTPS port</title></head>
<body>
<center><h1>400 Bad Request</h1></center>
<center>The plain HTTP request was sent to HTTPS port</center>
<hr><center>cloudflare</center>
</body>
</html>
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
Это один из множества вариантов что пробовал, перечитал форум, мучил GPT, но ничего не помогает. Помогите пожалуйста.