Chilkat HTTPS 纯 HTTP 请求被发送到 HTTPS 端口

Chilkat HTTPS The plain HTTP request was sent to HTTPS port

我正在使用 Chilkat ActiveX (Delphi) 9.5 版。 我使用 TChilkatHTTP POST 将一些数据发送到 HTTPS url。

http.SynchronousRequest(主机,443,0,req.ControlInterface);

我得到的回复是"The plain HTTP request was sent to HTTPS port"

我在谷歌上搜索了很多天的解决方案,但无法找到可行的解决方案。请如果有人知道我错过了什么。

非常感谢。

下面是 Chilkat 日志:

---- Sending ----
POST /qrCreate HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Host: api-testing.payhalal.my
Content-Length: 232

app_id=app-testing-d2277670007a30c2e6b6919fdfc696dd&amount=&currency=MYR&product_description=MY%20PRODUCT&order_id=12345&customer_name=SHELY&customer_email=eeshely%40gmail.com&customer_phone=0127806698&language=EN&timeout=3600&hash=
---- Received ----
HTTP/1.1 400 Bad Request
Server: nginx
Date: Thu, 12 Sep 2019 10:23:07 GMT
Content-Type: text/html
Content-Length: 264
Connection: close
Strict-Transport-Security: max-age=31536000; includeSubDomains

<html>
<head><title>400 The plain HTTP request was sent to HTTPS port</title></head>
<body bgcolor="white">
<center><h1>400 Bad Request</h1></center>
<center>The plain HTTP request was sent to HTTPS port</center>
<hr><center>nginx</center>
</body>
</html>
<html>
<head><title>400 The plain HTTP request was sent to HTTPS port</title></head>
<body bgcolor="white">
<center><h1>400 Bad Request</h1></center>
<center>The plain HTTP request was sent to HTTPS port</center>
<hr><center>nginx</center>
</body>
</html>

改变

http.SynchronousRequest(Host,443,0,req.ControlInterface); 

对此:

http.SynchronousRequest(Host,443,1,req.ControlInterface); 

参数3表示是否应该使用TLS。第二个参数只是端口号。