Skip to content

Commit 390dca8

Browse files
Change NetworkCurl (#1603)
Make sure we are using http2 when it's possible Relates-To: OCMAM-502 Signed-off-by: Mykhailo Kuchma <ext-mykhailo.kuchma@here.com>
1 parent ac33d9f commit 390dca8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

olp-cpp-sdk-core/src/http/curl/NetworkCurl.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -718,6 +718,9 @@ ErrorCode NetworkCurl::SendImplementation(
718718
curl_easy_setopt(curl_handle, CURLOPT_VERBOSE, 0L);
719719
}
720720

721+
// Request HTTP/2 when supported by the server (via ALPN negotiation)
722+
curl_easy_setopt(curl_handle, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2_0);
723+
721724
curl_easy_setopt(curl_handle, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_2);
722725

723726
const std::string& url = request.GetUrl();

0 commit comments

Comments
 (0)