Skip to content

Commit

Permalink
Merge pull request #1076 from libcpr/feature/const_get_cert_info
Browse files Browse the repository at this point in the history
Const Response::GetCertInfos()
  • Loading branch information
COM8 authored Jul 9, 2024
2 parents 923f83a + 985581d commit b505019
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cpr/response.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Response::Response(std::shared_ptr<CurlHolder> curl, std::string&& p_text, std::
curl_easy_getinfo(curl_->handle, CURLINFO_REDIRECT_COUNT, &redirect_count);
}

std::vector<CertInfo> Response::GetCertInfos() {
std::vector<CertInfo> Response::GetCertInfos() const {
assert(curl_);
assert(curl_->handle);
curl_certinfo* ci{nullptr};
Expand Down
2 changes: 1 addition & 1 deletion include/cpr/response.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class Response {

Response() = default;
Response(std::shared_ptr<CurlHolder> curl, std::string&& p_text, std::string&& p_header_string, Cookies&& p_cookies, Error&& p_error);
std::vector<CertInfo> GetCertInfos();
[[nodiscard]] std::vector<CertInfo> GetCertInfos() const;
Response(const Response& other) = default;
Response(Response&& old) noexcept = default;
~Response() noexcept = default;
Expand Down

0 comments on commit b505019

Please sign in to comment.