Add parameters like timeout, buffer_size to ClientSession.

This commit is contained in:
Chunting Gu
2019-07-26 09:59:24 +08:00
parent 64b3700675
commit 0f0f6fdf8e
3 changed files with 20 additions and 15 deletions
+6
View File
@@ -7,6 +7,12 @@
namespace webcc {
ClientSession::ClientSession(int timeout, bool ssl_verify,
std::size_t buffer_size)
: timeout_(timeout), ssl_verify_(ssl_verify), buffer_size_(buffer_size) {
InitHeaders();
}
void ClientSession::Auth(const std::string& type,
const std::string& credentials) {
headers_.Set(headers::kAuthorization, type + " " + credentials);