unittest / specify a cacert for tls client tests
This commit is contained in:
@ -55,6 +55,10 @@ TEST_CASE("http_client", "[http]")
|
||||
HttpClient httpClient;
|
||||
WebSocketHttpHeaders headers;
|
||||
|
||||
SocketTLSOptions tlsOptions;
|
||||
tlsOptions.caFile = "cacert.pem";
|
||||
httpClient.setTLSOptions(tlsOptions);
|
||||
|
||||
std::string url("https://httpbin.org/");
|
||||
auto args = httpClient.createRequest(url);
|
||||
|
||||
@ -94,6 +98,10 @@ TEST_CASE("http_client", "[http]")
|
||||
HttpClient httpClient(async);
|
||||
WebSocketHttpHeaders headers;
|
||||
|
||||
SocketTLSOptions tlsOptions;
|
||||
tlsOptions.caFile = "cacert.pem";
|
||||
httpClient.setTLSOptions(tlsOptions);
|
||||
|
||||
std::string url("https://httpbin.org/");
|
||||
auto args = httpClient.createRequest(url);
|
||||
|
||||
|
Reference in New Issue
Block a user