Add HEAD to switch in make_http_request().

This commit is contained in:
tastytea 2020-11-07 23:43:58 +01:00
parent 0173093d3d
commit 4624d407f2
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
1 changed files with 7 additions and 0 deletions

View File

@ -115,6 +115,13 @@ string CURLWrapper::make_http_request(http_method method, string_view uri)
break;
}
case http_method::HEAD:
{
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-vararg)
check(curl_easy_setopt(_connection, CURLOPT_CUSTOMREQUEST, "HEAD"));
break;
}
case http_method::PATCH:
{
// NOTE: Use CURLOPT_MIMEPOST, then set to PATCH to send data.