starkli
starkli copied to clipboard
feature request: custom RPC headers
Some RPC providers (notably Nethermind) use the same URL for their RPC endpoints and auth is done via a custom HTTP header (in this case x-apikey
). Would it be possible for starkli to support this?
Yeah maybe a --header
flag would do?
That would work.
Speaking for the Nethermind RPC service, we do support passing the API key in the query string now. But using the header remains preferable.
https://docs.data.voyager.online/apikey
Adding a --header
flag to each command invocation seems way too verbose though. Maybe we should make this a profile-only feature?
Now that I've learnt I can use the Nethermind RPC with passing the API key in the URL, I'm quite content and don't need the feature tbh. Feel free to close this issue instead.
Implemented in https://github.com/xJonathanLEI/starkli/commit/4cc8ad803bcd2605940b4c12ce93b5d79cffb034. Updated the relevant book section. Will be released in the next version.