ApeWorX / ApeWorX/web3.py

Update the default headers with `request_kwargs` passed to (Async)HTTPProvider

Open
#3,551 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
5.5k
Forks
1.7k
Avg merge
3d 10h
Merged PRs (30d)
2

Description

### What feature should we add?

Hi,

This is nice: https://github.com/ethereum/web3.py/commit/86827d68b01c532cf9047ea78fc602f04869b9c6
because it allows to build the header without having an instantiated object, and then pass them to the constructor.
(edit: I am actually wondering: why decorate `get_request_headers` with `@combomethod` and not `@classmethod`?!)

But it would be IMHO more straightforward if what is passed in `request_kwargs["headers"]` was used to extend the result of `HTTPProvider.get_request_headers`.

I am willing to open a PR, if you agree with this idea.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.