diff options
author | Paul Woolcock <paul@woolcock.us> | 2018-08-31 09:12:05 -0400 |
---|---|---|
committer | Paul Woolcock <paul@woolcock.us> | 2018-09-01 07:33:12 -0400 |
commit | 6befd79935ed40a5082d87d59651f9a1eab2f336 (patch) | |
tree | eb94e878aa72e46a09e54fa7105a48449d675868 | |
parent | 8db3d18219a8a3e3d1d9fb1e31ad53c13e644d2f (diff) |
use JSON instead of a mulitpart form
-rw-r--r-- | src/lib.rs | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -209,7 +209,7 @@ impl<H: HttpSend> MastodonClient<H> for Mastodon<H> { fn update_credentials(&self, changes: CredentialsBuilder) -> Result<Account> { 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<H: HttpSend> MastodonBuilder<H> { } } - #[allow(dead_code)] pub fn client(&mut self, client: Client) -> &mut Self { self.client = Some(client); self |