starkli icon indicating copy to clipboard operation
starkli copied to clipboard

feature request: custom RPC headers

Open milancermak opened this issue 1 year ago • 6 comments

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?

milancermak avatar Nov 06 '23 21:11 milancermak

Yeah maybe a --header flag would do?

xJonathanLEI avatar Nov 09 '23 08:11 xJonathanLEI

That would work.

milancermak avatar Nov 09 '23 09:11 milancermak

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

eliotstock avatar Dec 04 '23 03:12 eliotstock

Adding a --header flag to each command invocation seems way too verbose though. Maybe we should make this a profile-only feature?

xJonathanLEI avatar Dec 28 '23 08:12 xJonathanLEI

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.

milancermak avatar Jan 02 '24 11:01 milancermak

Implemented in https://github.com/xJonathanLEI/starkli/commit/4cc8ad803bcd2605940b4c12ce93b5d79cffb034. Updated the relevant book section. Will be released in the next version.

xJonathanLEI avatar May 19 '24 14:05 xJonathanLEI