aboutsummaryrefslogtreecommitdiffstats
path: root/src/client.rs
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2019-07-29 11:02:32 +0200
committerHarald Eilertsen <haraldei@anduin.net>2019-07-29 11:02:32 +0200
commit9806d9e094271f76c99589d252a57117d35ae7e5 (patch)
tree6e8276d68e164a076274b7b394b103fa67040dc7 /src/client.rs
parentbd7e83d326f3f96c6483b9668a59f261eedf9991 (diff)
downloadrust-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.rs3
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();