From 985581d5b20c432061f4e05f3f3a3d57475f7500 Mon Sep 17 00:00:00 2001 From: Fabian Sauter Date: Thu, 4 Jul 2024 18:05:30 +0200 Subject: [PATCH] Const Response::GetCertInfos() --- cpr/response.cpp | 2 +- include/cpr/response.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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;