From 6befd79935ed40a5082d87d59651f9a1eab2f336 Mon Sep 17 00:00:00 2001 From: Paul Woolcock Date: Fri, 31 Aug 2018 09:12:05 -0400 Subject: [PATCH] use JSON instead of a mulitpart form --- src/lib.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 1fb1da1..bdc962b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -209,7 +209,7 @@ impl MastodonClient for Mastodon { fn update_credentials(&self, changes: CredentialsBuilder) -> Result { let url = self.route("/api/v1/accounts/update_credentials"); - let response = self.send(self.client.patch(&url).multipart(changes.into_form()?))?; + let response = self.send(self.client.patch(&url).json(&changes))?; let status = response.status().clone(); @@ -381,7 +381,6 @@ impl MastodonBuilder { } } - #[allow(dead_code)] pub fn client(&mut self, client: Client) -> &mut Self { self.client = Some(client); self