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
+11
View File
@@ -4,14 +4,25 @@
#include <string>
namespace webcc {
namespace utility {
// Get a randomly generated UUID.
std::string RandomUuid();
// Get default user agent for HTTP headers.
const std::string& UserAgent();
// Get the timestamp for HTTP Date header field.
// E.g., Wed, 21 Oct 2015 07:28:00 GMT
// See: https://tools.ietf.org/html/rfc7231#section-7.1.1.2
std::string GetTimestamp();
// Split a key-value string.
// E.g., split "Connection: Keep-Alive".
bool SplitKV(const std::string& str, char delimiter,
std::string* key, std::string* value);
} // namespace utility
} // namespace webcc
#endif // WEBCC_UTILITY_H_