CInternetSession - get revocation server

Flaviu_ 1,031 Reputation points
2023-07-06T10:28:35.2933333+00:00

I have the following endpoint address:

https://www.datasource.com/api/v1/fget_data?text=abcd&key=my_api_key

works fine callen from browser. But if I call this address from the following code:

CInternetSession session{};

...

std::unique_ptr<CStdioFile> pFile{ session.OpenURL(_T("https://www.datasource.com/api/v1/fget_data?text=abcd&key=my_api_key"), 1, INTERNET_FLAG_TRANSFER_BINARY | SECURITY_FLAG_IGNORE_REVOCATION, nullptr, 0) };

I got:

It was not possible to connect to the revocation server or a definitive response could not be obtained.

How can I overcome this error ?

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,829 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.