Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add headers to requests #58

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

inverted-capital
Copy link
Contributor

Tigris has updated their consistency model and to get strongly consistent reads I need to pass in a header

https://www.tigrisdata.com/docs/concepts/consistency/

@bradenmacdonald
Copy link
Owner

Are the headers different for every request, or always the same? I'm wondering if we should just allow specifying some extraHeaders when initializing the client, and then have it use those for every request. Or does it need to be specified per request? Or do some requests not want these extra headers?

@inverted-capital
Copy link
Contributor Author

Good point... they are different in SOME cases. The header in question is the one that determines strong consistency or weak. I do want the ability to do a weak consistency GET but other times I want a strong GET or a strong PUT.

Extra headers sounds helpful, so in my case I would make two client instances, one with strong consistency headers, and the other being weak consistency by the absence of the strong headers. That seems simpler than fiddling around with state management in the requests ?

@bradenmacdonald
Copy link
Owner

Yeah, that would make sense to me. But I'm open to including per-request headers [as well] if there are use cases for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants