fix: extract html responses
This commit is contained in:
parent
23abb7706e
commit
6fa7606226
1 changed files with 1 additions and 1 deletions
|
@ -186,7 +186,7 @@ async fn format_body(res: reqwest::Response) -> Result<String, PostWomanError> {
|
|||
None => Ok(res.text().await? + "\n"),
|
||||
Some(v) => match v.to_str()? {
|
||||
"application/json" => Ok(serde_json::to_string_pretty(&res.json::<serde_json::Value>().await?)? + "\n"),
|
||||
"text/plain" => Ok(res.text().await? + "\n"),
|
||||
"text/plain" | "text/html" => Ok(res.text().await? + "\n"),
|
||||
_ => Ok(format!("base64({})\n", BASE64_STANDARD.encode(res.bytes().await?))),
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue