Support request and response compression.

This commit is contained in:
Chunting Gu
2019-03-20 17:47:45 +08:00
parent f6c305d266
commit d906470a4a
18 changed files with 250 additions and 100 deletions
+16
View File
@@ -103,6 +103,22 @@ void ListAuthUserFollowers(webcc::HttpClientSession& session,
}
}
void CreateAuthorization(webcc::HttpClientSession& session,
const std::string& auth) {
try {
std::string data = "{'note': 'Webcc test', 'scopes': ['public_repo', 'repo', 'repo:status', 'user']}";
auto r = session.Post(kUrlRoot + "/authorizations", std::move(data), true,
{"Authorization", auth});
std::cout << r->content() << std::endl;
} catch (const webcc::Exception& e) {
std::cout << e.what() << std::endl;
}
}
// -----------------------------------------------------------------------------
int main() {