mirror of
https://github.com/transatoshi-mw/grin-explorer.git
synced 2025-10-22 13:53:40 +00:00
return application/json content-type for post api
This commit is contained in:
@@ -80,9 +80,9 @@ pub async fn call(method: &str, params: &str, id: &str, rpc_type: &str) -> Resul
|
||||
|
||||
let client = reqwest::Client::new();
|
||||
let result = client.post(rpc_url)
|
||||
.body(format!("{{\"method\": \"{}\", \"params\": {}, \"id\": {}}}", method, params, id))
|
||||
.body(format!("{{\"method\": \"{}\", \"params\": {}, \"id\": {}, \"jsonrpc\": \"2.0\"}}", method, params, id))
|
||||
.basic_auth(CONFIG.user.clone(), Some(secret))
|
||||
.header("content-type", "plain/text")
|
||||
.header("content-type", "application/json")
|
||||
.send()
|
||||
.await?;
|
||||
|
||||
|
Reference in New Issue
Block a user