introduce string_view

This commit is contained in:
Chunting Gu
2021-06-17 18:58:53 +08:00
parent 751a3539ae
commit 26bb6b341a
38 changed files with 404 additions and 344 deletions
+6
View File
@@ -55,6 +55,12 @@ ResponseBuilder& ResponseBuilder::File(const fs::path& path,
return *this;
}
ResponseBuilder& ResponseBuilder::Header(string_view key, string_view value) {
headers_.push_back(ToString(key));
headers_.push_back(ToString(value));
return *this;
}
ResponseBuilder& ResponseBuilder::Date() {
headers_.push_back(headers::kDate);
headers_.push_back(utility::HttpDate());