ws curl + http client tls option handling + ca cert processing for mbedtls

This commit is contained in:
Benjamin Sergeant
2019-09-29 21:13:11 -07:00
parent 89d2606b1d
commit 2229159bd2
9 changed files with 51 additions and 14 deletions

View File

@ -43,6 +43,11 @@ namespace ix
_thread.join();
}
void HttpClient::setTLSOptions(const SocketTLSOptions& tlsOptions)
{
_tlsOptions = tlsOptions;
}
HttpRequestArgsPtr HttpClient::createRequest(const std::string& url, const std::string& verb)
{
auto request = std::make_shared<HttpRequestArgs>();
@ -142,8 +147,7 @@ namespace ix
bool tls = protocol == "https";
std::string errorMsg;
SocketTLSOptions tlsOptions;
_socket = createSocket(tls, errorMsg, tlsOptions);
_socket = createSocket(tls, errorMsg, _tlsOptions);
if (!_socket)
{