why my code does not work :/
#include "WinHttp.au3"
#include "JSON.au3"
Opt("MustDeclareVars", 1)
Global $hOpen = _WinHttpOpen()
Global $hConnect = _WinHttpConnect($hOpen, "https://api.coinpaprika.com/", $INTERNET_DEFAULT_HTTPS_PORT)
Global $hRequest = _WinHttpOpenRequest($hConnect, _
"GET", _
"v1/coins/btc-bitcoin")
_WinHttpSendRequest($hRequest)
_WinHttpReceiveResponse($hRequest)
Local $sReturned = ''
If
@Celtic88
As the error message said, you were trying to send a plain HTTP request over an HTTPS port. So you have two choices to correct the error, you can change the script to send an HTTP request over port 80 or a secure request over port 443. Examples of the 2 options are below:
HTTP Request
Global $hOpen = _WinHttpOpen()
Global $hConnect = _WinHttpConnect($hOpen, "http://api.coinpaprika.com/")
Global $hRequest = _WinHttpOpenRequest($hConnect, "GET"