feat(hub): allow to set user-agent

Fixes #24
This commit is contained in:
Sebastian Thiel
2015-03-19 07:54:15 +01:00
parent 9d401f5486
commit cb5a0a35bc
2 changed files with 15 additions and 1 deletions

View File

@@ -634,7 +634,7 @@ else {
% endif
let mut req = client.borrow_mut().request(hyper::method::Method::Extension("${m.httpMethod}".to_string()), url.as_slice())
.header(hyper::header::UserAgent("google-api-rust-client/${cargo.build_version}".to_string()))\
.header(hyper::header::UserAgent(self.hub._user_agent.clone()))\
% if supports_scopes(auth):
.header(auth_header)\