feat: add custom headers support via .header() on client builder#273
Merged
feat: add custom headers support via .header() on client builder#273
Conversation
- QdrantConfig: add custom_headers field and .header(key, value) builder method
- TokenInterceptor: inject custom headers into all gRPC request metadata
- download_snapshot: send api_key and custom headers on REST snapshot download
Allows setting one or multiple custom headers when building the client, e.g.:
Qdrant::from_url("http://localhost:6334")
.header("x-custom-id", "my-client")
.header("x-request-source", "batch-job")
.build()
Made-with: Cursor
Made-with: Cursor
Made-with: Cursor
598a448 to
79e6d56
Compare
1888337 to
5614833
Compare
dancixx
approved these changes
Feb 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the ability to set custom headers on the Qdrant client so they are sent with every request (gRPC and REST).
Changes
config.rs): Newcustom_headers: Vec<(String, String)>field and.header(key, value)builder method. Can be chained to add multiple headers.auth.rs): Injects custom headers into gRPC request metadata (after api-key).snapshot.rs,download_snapshotsfeature): Builds the REST request with areqwest::Clientand adds api_key + custom headers instead of plainreqwest::get().Usage
Custom headers are sent on all gRPC calls and on snapshot download (REST) when using the
download_snapshotsfeature.Made with Cursor