Skip to content

Commit

Permalink
Include header values when dumping HTTP responses.
Browse files Browse the repository at this point in the history
  • Loading branch information
saurik committed Feb 26, 2024
1 parent 07e10bb commit c0d3629
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion p2p/source/response.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@ struct Response :
};

inline std::ostream &operator <<(std::ostream &out, const Response &response) {
return out << "{ status: " << response.result() << ", body: ```" << response.body() << "``` }";
out << "{ status: " << response.result() << ", body: ```" << response.body() << "``` }";
for (const auto &header : response)
out << " " << header.name_string() << ":" << header.value() << std::endl;
return out;
}

}
Expand Down

0 comments on commit c0d3629

Please sign in to comment.