mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-04 14:29:45 +00:00
allow for charset (#1354)
This commit is contained in:
@@ -22,6 +22,8 @@ pub async fn get(#[arg] url: Url) -> Result<Value, Error> {
|
|||||||
.remove("Content-Type")
|
.remove("Content-Type")
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.and_then(|h| h.to_str().ok())
|
.and_then(|h| h.to_str().ok())
|
||||||
|
.and_then(|h| h.split(";").next())
|
||||||
|
.map(|h| h.trim())
|
||||||
{
|
{
|
||||||
Some("application/json") => response
|
Some("application/json") => response
|
||||||
.json()
|
.json()
|
||||||
|
|||||||
Reference in New Issue
Block a user