add Accept() for Accept header to request builder

This commit is contained in:
Chunting Gu
2020-08-10 09:48:30 +08:00
parent b334e359d7
commit 39ade6df4f
6 changed files with 42 additions and 14 deletions
+5 -2
View File
@@ -46,6 +46,9 @@ public:
charset_ = charset;
}
// Set content types to accept.
void Accept(const std::string& content_types);
// Set authorization.
void Auth(const std::string& type, const std::string& credentials);
@@ -69,11 +72,11 @@ private:
ResponsePtr DoSend(RequestPtr request, bool stream);
private:
// Default media type for `Content-Type` header.
// The media (or MIME) type of `Content-Type` header.
// E.g., "application/json".
std::string media_type_;
// Default charset for `Content-Type` header.
// The charset of `Content-Type` header.
// E.g., "utf-8".
std::string charset_;