diff options
-rw-r--r-- | Cargo.toml | 4 | ||||
-rw-r--r-- | src/client.rs | 2 |
2 files changed, 3 insertions, 3 deletions
@@ -22,12 +22,12 @@ edition = "2018" [dependencies] reqwest = "0.9.1" -serde = "1.0" +serde = { version = "1.0", features = ["derive"] } serde_urlencoded = "0.5.1" [dev-dependencies] base64 = "0.11.0" clap = "2.33.0" dotenv = "0.13" -mockito = "0.19" +mockito = "0.22" serde_json = "1.0" diff --git a/src/client.rs b/src/client.rs index 95643a1..507f845 100644 --- a/src/client.rs +++ b/src/client.rs @@ -41,6 +41,7 @@ pub const ZOTAPI_GROUP_MEMBERS_PATH : &str = "/api/z/1.0/group_members"; pub const ZOTAPI_ITEM_UPDATE_PATH : &str = "/api/z/1.0/item/update"; pub const ZOTAPI_XCHAN_PATH : &str = "/api/z/1.0/xchan"; +#[derive(Debug)] pub struct Client { inner: reqwest::Client, base_url: String, @@ -144,7 +145,6 @@ impl Client { let res = self.inner.post(&url) .basic_auth(self.user.clone(), Some(self.pw.clone())) - .header(CONTENT_TYPE, "multipart/form-data") .multipart(form) .send()?; |