Closed aboulay closed 1 year ago
Hey!
Once 3.7.4 is available on pypi, you can update and do the following:
from pytezos.rpc.node import RpcNode
from pytezos.rpc.shell import ShellQuery
pytezos = pytezos.using(shell=ShellQuery(RpcNode("https://rpc.tzkt.io/ghostnet", headers={"User-agent": "Hello"})))
Hi everyone,
We are currently trying to join a commercial Tezos RPC node which are exposed through a proxy and we have seen they have a pretty cool functionality which permits to use a JWT with a header
Authorization: Bearer <base64 encoded token>
or a simple password with a headerAuthorization: Basic <base64 encoded token>
to authenticate and connect to the node in addition of a unique url.I have seen nothing in the documentation which permits to add a custom header to the request built by the pytezos library and I don't know if there is a possibility to do it. Have I missed something about it? If not, do you think it could be a useful feature for pytezos users?
Edit: For the JWT, the header is
Authorization: Bearer
instead ofAuthorization: Basic
. This has be reported on the main message.