feat/support_fiber #2

Merged
tqcq merged 57 commits from feat/support_fiber into master 2024-06-21 10:33:52 +08:00
2 changed files with 14 additions and 0 deletions
Showing only changes of commit b8b172b3b3 - Show all commits

View File

@ -165,4 +165,14 @@ TryParseTraits<HttpVersion>::TryParse(Slice version) {
return iter->second;
}
std::ostream &operator<<(std::ostream &os, HttpMethod method) {
return os << ToSlice(method);
}
std::ostream &operator<<(std::ostream &os, HttpStatus status) {
return os << ToSlice(status);
}
std::ostream &operator<<(std::ostream &os, HttpVersion version) {
return os << ToSlice(version);
}
} // namespace tile

View File

@ -91,6 +91,10 @@ template <> struct TryParseTraits<HttpVersion> {
static std::optional<HttpVersion> TryParse(Slice s);
};
std::ostream &operator<<(std::ostream &os, HttpMethod method);
std::ostream &operator<<(std::ostream &os, HttpStatus status);
std::ostream &operator<<(std::ostream &os, HttpVersion version);
} // namespace tile
#endif // _TILE_NET_HTTP_TYPES_H