Initialize http_status, check curl_easy_getinfo().

This commit is contained in:
tastytea 2020-11-07 23:44:27 +01:00
parent 4624d407f2
commit 4a64bd5300
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
1 changed files with 2 additions and 2 deletions

View File

@ -168,9 +168,9 @@ string CURLWrapper::make_http_request(http_method method, string_view uri)
}
}
long http_status; // NOLINT(google-runtime-int)
long http_status{0}; // NOLINT(google-runtime-int)
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-vararg)
curl_easy_getinfo(_connection, CURLINFO_RESPONSE_CODE, &http_status);
check(curl_easy_getinfo(_connection, CURLINFO_RESPONSE_CODE, &http_status));
// status code is in http_status, headers are in _buffer_headers, body is in
// _buffer_body.
// TODO: Communicate the above.