graphlient icon indicating copy to clipboard operation
graphlient copied to clipboard

Dynamically change headers

Open dfritsch86 opened this issue 5 years ago • 2 comments

I need to dynamically change request headers, e.g. to switch bearer tokens when i reached the limit. How can i accomplish this?

dfritsch86 avatar Apr 23 '19 17:04 dfritsch86

I believe right now this would require you to create a new instance of a client. We should call it a bug. I'd like to be able to do:

client.options[:headers] = { new headers }

Maybe you can write a spec for this behavior and we can try and fix this?

dblock avatar Apr 24 '19 13:04 dblock

yes, this makes sense, a failing spec would be 👌

ashkan18 avatar Apr 24 '19 13:04 ashkan18