|
@@ -1,5 +1,5 @@
|
1
|
1
|
use reqwest::{
|
2
|
|
- header::{HeaderMap, CONTENT_TYPE},
|
|
2
|
+ header::{HeaderMap, HeaderValue, CONTENT_TYPE},
|
3
|
3
|
Client, ClientBuilder, Response as Resp,
|
4
|
4
|
};
|
5
|
5
|
use serde::{Deserialize, Serialize};
|
|
@@ -25,8 +25,7 @@ impl RpcClient {
|
25
|
25
|
/// - url - It's an RPC endpoint [`Url`]
|
26
|
26
|
pub(crate) fn new(url: Url) -> Result<Self> {
|
27
|
27
|
let mut headers = HeaderMap::new();
|
28
|
|
- // It can't panic
|
29
|
|
- headers.insert(CONTENT_TYPE, "application/json".parse().unwrap());
|
|
28
|
+ headers.insert(CONTENT_TYPE, HeaderValue::from_static("application/json"));
|
30
|
29
|
let client = ClientBuilder::new()
|
31
|
30
|
.default_headers(headers)
|
32
|
31
|
.build()
|