1
0
mirror of https://github.com/vbrandl/bind9-api.git synced 2025-08-21 03:55:37 +02:00

Update dependencies

This commit is contained in:
Valentin Brandl
2019-05-26 01:27:39 +02:00
parent 2f7e28e531
commit a0d59b42a9
9 changed files with 1132 additions and 2910 deletions

View File

@@ -42,7 +42,6 @@ extern crate clap;
extern crate crypto;
extern crate data;
extern crate failure;
#[macro_use]
extern crate hyper;
#[macro_use]
extern crate log;
@@ -65,8 +64,6 @@ use std::borrow::Cow;
type Result<T> = std::result::Result<T, Error>;
header! { (XApiToken, data::TOKEN_HEADER) => [String] }
#[derive(Eq, PartialEq, Clone, Copy)]
enum Method {
POST,
@@ -116,9 +113,10 @@ fn call_api<D: serde::Serialize>(
client.post(&url)
} else {
client.delete(&url)
}.header(XApiToken(signature))
.json(&data)
.send()?)
}
.header("X-Api-Token", signature)
.json(&data)
.send()?)
}
fn main() -> Result<()> {