diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2019-07-29 11:02:32 +0200 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2019-07-29 11:02:32 +0200 |
commit | 9806d9e094271f76c99589d252a57117d35ae7e5 (patch) | |
tree | 6e8276d68e164a076274b7b394b103fa67040dc7 /src/client.rs | |
parent | bd7e83d326f3f96c6483b9668a59f261eedf9991 (diff) | |
download | rust-zotapi-9806d9e094271f76c99589d252a57117d35ae7e5.tar.gz rust-zotapi-9806d9e094271f76c99589d252a57117d35ae7e5.tar.bz2 rust-zotapi-9806d9e094271f76c99589d252a57117d35ae7e5.zip |
Abstract away type of stored data in an Item.
Currently this seems rather pointless, but will make more sense when
we need to store arrays in the Item data set.
Diffstat (limited to 'src/client.rs')
-rw-r--r-- | src/client.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client.rs b/src/client.rs index e1561bf..95643a1 100644 --- a/src/client.rs +++ b/src/client.rs @@ -128,7 +128,8 @@ impl Client { handle_result(res) } - pub fn post_multipart(&self, path: &str, data: &BTreeMap<&str, &str>, files: &Vec<&str>) -> Result<String, Error> + pub fn post_multipart<T>(&self, path: &str, data: &BTreeMap<&str, T>, files: &Vec<&str>) -> Result<String, Error> + where T: ToString, { let url = dbg!(self.url(path, &())); let mut form = reqwest::multipart::Form::new(); |