Skip to content

feat: add custom headers to search api requests#943

Merged
gadomski merged 14 commits intostac-utils:mainfrom
underchemist:pass-headers-to-search
Feb 3, 2026
Merged

feat: add custom headers to search api requests#943
gadomski merged 14 commits intostac-utils:mainfrom
underchemist:pass-headers-to-search

Conversation

@underchemist
Copy link
Contributor

@underchemist underchemist commented Feb 1, 2026

Description

This PR adds a --header option to the search subcommand which are passed to the reqwest::ClientBuilder::default_headers method. The intended use case is to enable the passing of custom headers to requests made by the rustac STAC api client e.g. Authorization headers.

This adds a new ApiClientBuilder struct which wraps reqwests::ClientBuilder in order to manage adding creating a Client instance with default headers.

I used copilot to help me in my approach.

Checklist

Delete any checklist items that do not apply (e.g. if your change is minor, it may not require documentation updates).

  • Unit tests
  • Documentation, including doctests
  • Pull request title follows conventional commits
  • Pre-commit hooks pass (prek run --all-files)

@underchemist
Copy link
Contributor Author

I'm not familiar enough with rust ecosystem to interpret the msrv failure. To me this appears to be an issue compiling a third-party crate. If there is something that needs to be addressed for that let me know.

@gadomski
Copy link
Member

gadomski commented Feb 3, 2026

Should be fixed by #944 🤞🏼

Copy link
Member

@gadomski gadomski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, thanks!

@gadomski gadomski merged commit 315d078 into stac-utils:main Feb 3, 2026
11 checks passed
@stac-utils-release-bot stac-utils-release-bot bot mentioned this pull request Feb 3, 2026
gadomski pushed a commit that referenced this pull request Feb 3, 2026
## 🤖 New release

* `stac`: 0.16.1 -> 0.16.2 (✓ API compatible changes)
* `stac-duckdb`: 0.3.3 -> 0.3.4
* `stac-io`: 0.2.3 -> 0.2.4 (✓ API compatible changes)
* `stac-server`: 0.4.4 -> 0.4.5 (✓ API compatible changes)
* `rustac`: 0.2.5 -> 0.2.6
* `pgstac`: 0.4.4 -> 0.4.5
* `stac-validate`: 0.6.3 -> 0.6.4
* `stac-extensions`: 0.1.5 -> 0.1.6

<details><summary><i><b>Changelog</b></i></summary><p>

## `stac`

<blockquote>

##
[0.16.2](stac-v0.16.1...stac-v0.16.2)
- 2026-02-03

### Other

- bump msrv version
([#944](#944))
</blockquote>

## `stac-duckdb`

<blockquote>

##
[0.3.4](stac-duckdb-v0.3.3...stac-duckdb-v0.3.4)
- 2026-02-03

### Other

- bump msrv version
([#944](#944))
</blockquote>

## `stac-io`

<blockquote>

##
[0.2.4](stac-io-v0.2.3...stac-io-v0.2.4)
- 2026-02-03

### Added

- add search_with_headers
([#948](#948))
- add custom headers to search api requests
([#943](#943))

### Other

- bump msrv version
([#944](#944))
</blockquote>

## `stac-server`

<blockquote>

##
[0.4.5](stac-server-v0.4.4...stac-server-v0.4.5)
- 2026-02-03

### Other

- bump msrv version
([#944](#944))
</blockquote>

## `rustac`

<blockquote>

##
[0.2.6](rustac-v0.2.5...rustac-v0.2.6)
- 2026-02-03

### Added

- add search_with_headers
([#948](#948))
- add custom headers to search api requests
([#943](#943))

### Other

- bump msrv version
([#944](#944))
</blockquote>

## `pgstac`

<blockquote>

##
[0.4.5](pgstac-v0.4.4...pgstac-v0.4.5)
- 2026-02-03

### Other

- updated the following local packages: stac
</blockquote>

## `stac-validate`

<blockquote>

##
[0.6.4](stac-validate-v0.6.3...stac-validate-v0.6.4)
- 2026-02-03

### Other

- updated the following local packages: stac
</blockquote>

## `stac-extensions`

<blockquote>

##
[0.1.6](stac-extensions-v0.1.5...stac-extensions-v0.1.6)
- 2026-02-03

### Other

- updated the following local packages: stac
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/release-plz/release-plz/).

Co-authored-by: stac-utils-release-bot[bot] <249776822+stac-utils-release-bot[bot]@users.noreply.github.com>
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