I'm web scraping some https website. This is my code.
hh.OpenHttp AddressOf InternetStatusCallback, "MY WEBSITE", "GET", 443, "/search/searchResult"
...
Private ctx As LongPtr
...
'OpenHttp Function
openRequestHandle = HttpOpenRequest(connectHandle, mMethod, mUrl, vbNullString, vbNullString, vbNullString, INTERNET_FLAG_RELOAD Or INTERNET_FLAG_NO_CACHE_WRITE, VarPtr(ctx))
And I got this.
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>400 Bad Request</title>
</head><body>
<h1>Bad Request</h1>
<p>Your browser sent a request that this server could not understand.<br />
Reason: You're speaking plain HTTP to an SSL-enabled server port.<br />
Instead use the HTTPS scheme to access this URL, please.<br />
<blockquote>Hint: <a href="MY WEBSITE"><b>MY WEBSITE</b></a></blockquote></p>
</body></html>
The website is not mine so I can't edit website. I can just only edit my code.
Any ideas?