Https cpr error

when I use cpr on a site that has a cloudflare certificate installed, I get this error:
schannel: next InitializeSecurityContext failed: SEC_E_ILLEGAL_MESSAGE (0x80090326) - This error usually occurs when a fatal SSL/TLS alert is received (e.g. handshake failed). More detail may be available in the Windows System event log.

    cpr::Response r = cpr::Get(cpr::Url{"https://www.example.com"});
    
    if (r.status_code == 200) {
        std::cout << "Response body: " << r.text << std::endl;
    } else {
        std::cout << "Error: " << r.error.message << std::endl;
    }

What can be wrong?

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