allow for charset (#1354)

This commit is contained in:
Aiden McClelland
2022-03-23 15:31:45 -05:00
committed by GitHub
parent 476b9a3c9c
commit e7f4aefb72

View File

@@ -22,6 +22,8 @@ pub async fn get(#[arg] url: Url) -> Result<Value, Error> {
.remove("Content-Type")
.as_ref()
.and_then(|h| h.to_str().ok())
.and_then(|h| h.split(";").next())
.map(|h| h.trim())
{
Some("application/json") => response
.json()