Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with web3_client_version & default behaviour targeting Anvil and more? #158

Open
arevaklg opened this issue Mar 29, 2024 · 1 comment

Comments

@arevaklg
Copy link

Sorry if I am missing some page on issue guidelines or something. I looked around a bit but couldn't find one. Here is the TL;DR

Description

When running Ethereumex.HttpClient.web3_client_version() against an Anvil node, Anvil will respond with missing Content-Type header. It seems that somewhere along the way the library drops that header from this request at least. I know this because you can make this call Ethereumex.HttpClient.web3_client_version(http_headers: [{"Content-Type", "application/json"}]) and Anvil accepts the request. Since this request is a POST, and you are POSTing JSON, it seems appropriate to add the Content-Type header to the HTTP Request. Other RPCs like Alchemy happen to be a bit more lenient.

Reference:

@ayrat555
Copy link
Member

json header should be present by default f051c4a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants