Allow to add Date header to the request.

This commit is contained in:
Chunting Gu
2019-06-06 13:32:46 +08:00
parent 7af95778f5
commit 22b209d13e
17 changed files with 53 additions and 34 deletions
+6
View File
@@ -78,6 +78,12 @@ RequestBuilder& RequestBuilder::AuthToken(const std::string& token) {
return Auth("Token", token);
}
RequestBuilder& RequestBuilder::Date() {
headers_.push_back(headers::kDate);
headers_.push_back(utility::GetTimestamp());
return *this;
}
void RequestBuilder::SetContent(RequestPtr request, std::string&& data) {
#if WEBCC_ENABLE_GZIP
if (gzip_ && data.size() > kGzipThreshold) {