Failed to send any GET request

hello. I have a trouble.
I’am using Delphi XE 10 and trying to send a GET request to api.twitch.tv/something, but it’s fails.
my code:

hInet := InternetOpen(PChar(sUserAgent), INTERNET_OPEN_TYPE_PRECONFIG,
nil, nil, 0);
if Assigned(hInet) then
begin
hConnect := InternetConnect(hInet, PChar(‘api.twitch.tv’),
INTERNET_DEFAULT_HTTPS_PORT, nil, nil,
INTERNET_SERVICE_HTTP, 0, 0);
if Assigned(hConnect) then
begin
p := PChar(‘Accept: ’ + TWITCH_V5_ACCEPT + #0);
hRequest := HttpOpenRequest(hConnect, ‘GET’, PChar(’/helix/users?login=miramisu’),
HTTP_VERSION, ‘’, @p, INTERNET_FLAG_SECURE, 0);
if Assigned(hRequest) then
begin
Header := 'Client-ID: ’ + any ID; //does not matter
if not HttpSendRequest(hRequest, PChar(Header), Length(Header), nil, 0) then // this statement is always equals to FALSE
begin
InternetCloseHandle(hRequest);
InternetCloseHandle(hConnect);
InternetCloseHandle(hInet);
Exit;
end;

But since today it’s does not working anymore. Any GET requests to twitch fails.
Please help!

At the current moment, the OCSP Responder server for checking the validity of TLS certificates is experiencing issues. Specifically ocsp2.globalsign.com.

If you check your errors, you’ll see something of the sort: “it was not possible to connect to the revocation server or a definitive response could not be obtained”

So the issue is with GlobalSign at the moment.

but in the Postman it’s works. Why?

Different applications might use a different OCSP Responder to verify a certificate than what Windows uses in it’s CryptoAPI. My application right now is not working with similar native Windows calls as yours.

It’s the TLS handshake breaking down because that particular OCSP server Windows is trying to use is having issues.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.