Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Tool, service and variable get requests omit configured headers

Open Beginner friendly
#122 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
88/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
api, backend

Research direction

Start at ToolServiceVariableBaseQuery.get and compare its request loop with Query.get, Query.results, and Query.hits. Use Requests' send interception to verify configured headers across ToolQuery, ServiceQuery, and VariableQuery, including pagination and empty results. Done means the focused offline cases pass while pagination, output formatting, and HTTP error propagation remain unchanged.

Written by the indexing model from the issue text.

Description

Problem

On develop at 9f7648ccb925b9c0eb50241e35f15d6454e89505, ToolServiceVariableBaseQuery.get omits the configured request headers. The shared implementation affects ToolQuery, ServiceQuery and VariableQuery.

Setting headers through either supported token method, or directly through the public headers mapping, works for the base Query methods but has no effect on the specialized get requests. The request loop supplies only its URL and pagination parameters.

Reproduction

Create any of the three query classes, configure a header, and call get with Requests' send method intercepted. The prepared request does not contain the configured header. This reproduces on every page. No live request is needed.

Expected behavior

Forward the query's headers on every get request, consistent with Query.get, Query.results and Query.hits. Preserve current pagination, output-format handling, empty results and HTTP error propagation.

A focused production fix and 18 offline test cases are prepared. Twelve fail on the original implementation and six controls pass. The complete 147-test suite passes with the fix using the repository-locked HTTP/VCR versions, as do mypy and the repository's gating lint checks. No real credentials or live CMR calls are used.

Dominant language
Python
Stars
29
Forks
32
PR merge metrics
No merged PRs in 30d

Getting set up

We have not checked this project's setup files yet. Start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nasa/python_cmr

All issues in nasa/python_cmr

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.