Skip to content

Commit

Permalink
Supply Content-Type header to JSON-RPC call (#952)
Browse files Browse the repository at this point in the history
Fixes #951
  • Loading branch information
cburgdorf authored Nov 15, 2023
1 parent e147098 commit 190ac03
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`.

1 comment on commit 190ac03

@Eldeloto
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

crates/fe/src/task/verify.rs

Please sign in to comment.