xJonathanLEI / starkli

Starkli (/ˈstɑːrklaɪ/), a ⚡ blazing ⚡ fast ⚡ CLI tool for Starknet powered by 🦀 starknet-rs 🦀
https://book.starkli.rs
Apache License 2.0
164 stars 47 forks source link

feature request: custom RPC headers #43

Open milancermak opened 11 months ago

milancermak commented 11 months ago

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?

xJonathanLEI commented 11 months ago

Yeah maybe a --header flag would do?

milancermak commented 11 months ago

That would work.

eliotstock commented 10 months ago

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

xJonathanLEI commented 9 months ago

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

milancermak commented 9 months ago

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.

xJonathanLEI commented 4 months ago

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