|
@@ -11,7 +11,7 @@ use serde_json::Value;
|
|
|
use serde_repr::{Deserialize_repr, Serialize_repr};
|
|
|
use url::Url;
|
|
|
|
|
|
-use std::{collections::HashMap, path::PathBuf, time::Duration};
|
|
|
+use std::{collections::HashMap, time::Duration};
|
|
|
|
|
|
/// The builder of [`Client`].
|
|
|
#[derive(Debug, Clone, Default, Deserialize)]
|
|
@@ -129,7 +129,6 @@ impl Client {
|
|
|
for (name, part) in form_body.0 {
|
|
|
match part {
|
|
|
FormPart::Bytes(bytes) => form.push((name, serde_json::to_string(&bytes)?)),
|
|
|
- FormPart::File(file_path) => form.push((name, serde_json::to_string(&file_path)?)),
|
|
|
FormPart::Text(text) => form.push((name, text)),
|
|
|
}
|
|
|
}
|
|
@@ -176,7 +175,6 @@ impl Client {
|
|
|
for (name, part) in form_body.0 {
|
|
|
match part {
|
|
|
FormPart::Bytes(bytes) => form.push((name, serde_json::to_string(&bytes)?)),
|
|
|
- FormPart::File(file_path) => form.push((name, serde_json::to_string(&file_path)?)),
|
|
|
FormPart::Text(text) => form.push((name, text)),
|
|
|
}
|
|
|
}
|
|
@@ -222,8 +220,6 @@ pub enum ResponseType {
|
|
|
#[serde(untagged)]
|
|
|
#[non_exhaustive]
|
|
|
pub enum FormPart {
|
|
|
- /// A file path value.
|
|
|
- File(PathBuf),
|
|
|
/// A string value.
|
|
|
Text(String),
|
|
|
/// A byte array value.
|