From 6eacab00f91b58fcce04cc1b89ab0c033205764d Mon Sep 17 00:00:00 2001 From: Valentin Brandl Date: Sun, 8 Jul 2018 20:28:32 +0200 Subject: [PATCH] Move hyper dependency to the client --- client/src/main.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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()?) }