diff --git a/client/src/main.rs b/client/src/main.rs index 0e67d2d..5566c14 100644 --- a/client/src/main.rs +++ b/client/src/main.rs @@ -45,6 +45,8 @@ extern crate crypto; extern crate data; extern crate failure; #[macro_use] +extern crate hyper; +#[macro_use] extern crate log; extern crate openssl_probe; extern crate pretty_env_logger; @@ -65,6 +67,8 @@ use std::borrow::Cow; type Result = std::result::Result; +header! { (XApiToken, data::TOKEN_HEADER) => [String] } + #[derive(Eq, PartialEq, Clone, Copy)] enum Method { POST, @@ -114,7 +118,7 @@ fn call_api( client.post(&url) } else { client.delete(&url) - }.header(data::XApiToken(signature)) + }.header(XApiToken(signature)) .json(&data) .send()?) }