diff --git a/cpr/response.cpp b/cpr/response.cpp index 16584cf98..a711ef27a 100644 --- a/cpr/response.cpp +++ b/cpr/response.cpp @@ -37,7 +37,7 @@ Response::Response(std::shared_ptr curl, std::string&& p_text, std:: curl_easy_getinfo(curl_->handle, CURLINFO_REDIRECT_COUNT, &redirect_count); } -std::vector Response::GetCertInfos() { +std::vector Response::GetCertInfos() const { assert(curl_); assert(curl_->handle); curl_certinfo* ci{nullptr}; diff --git a/include/cpr/response.h b/include/cpr/response.h index 5c296daa5..3550d0910 100644 --- a/include/cpr/response.h +++ b/include/cpr/response.h @@ -45,7 +45,7 @@ class Response { Response() = default; Response(std::shared_ptr curl, std::string&& p_text, std::string&& p_header_string, Cookies&& p_cookies, Error&& p_error); - std::vector GetCertInfos(); + [[nodiscard]] std::vector GetCertInfos() const; Response(const Response& other) = default; Response(Response&& old) noexcept = default; ~Response() noexcept = default;