Skip to content

Commit

Permalink
Supply Content-Type header to JSON-RPC call
Browse files Browse the repository at this point in the history
  • Loading branch information
cburgdorf committed Nov 9, 2023
1 parent a7c73b7 commit cffcc60
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions crates/fe/src/task/verify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ fn request_bytecode(rpc_url: &str, contract_address: &str) -> Result<String, Str
let client = reqwest::blocking::Client::new();
let res = client
.post(rpc_url)
.header("Content-Type", "application/json")
.body(format!(
"{{
\"jsonrpc\": \"2.0\",
Expand Down
5 changes: 5 additions & 0 deletions newsfragments/951.bugfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Fixed issue with `verify` not working with certain JSON-RPC providers.

Previously, the `verify` command would not work if a JSON-RPC provider
expected the request to be made with a `Content-Type` header. Now, the
`Content-Type` header is set as `application/json`.

0 comments on commit cffcc60

Please sign in to comment.