Skip to content
This repository was archived by the owner on Jun 1, 2026. It is now read-only.
This repository was archived by the owner on Jun 1, 2026. It is now read-only.

cpprestsdk http_client (https rest call) : http_client_config not working for certificate validation disabling #871

Description

@viter7960

Hi,
I'm using cpprestsdk 2.9.1 from nuget and making a call to azure log analytics (data collector api). It is a simple post request like following to send simple json content to the cloud.

            http_request request(methods::POST);
	request.headers().add(L"Content-Type", L"application/json; charset=UTF-8");
	request.headers().add(L"Log-Type", log_type.c_str());
	request.headers().add(L"x-ms-date", rfcDate.c_str());
	request.headers().add(L"Authorization", signature.c_str());
	
	json::value body = json::value::parse(log_json_format);
	request.set_body(body);				

	http_client_config config;		
	config.set_validate_certificates(false);
	http_client client(m_server_address, config);     // server address is https://.....
            client.request(request).then()......

But the certificate validation disabling is not working since I always receive Message "WinHttpSendRequest: 12044: A certificate is required to complete client authentication" from server.

Any help ?

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions