Skip to content

Add additional_headers configuration option#276

Closed
Jason Wang (jasonw-chime) wants to merge 1 commit into
contentful:masterfrom
jasonw-chime:jasonw-chime/add-custom-headers
Closed

Add additional_headers configuration option#276
Jason Wang (jasonw-chime) wants to merge 1 commit into
contentful:masterfrom
jasonw-chime:jasonw-chime/add-custom-headers

Conversation

@jasonw-chime

Copy link
Copy Markdown

Summary

  • Adds a new additional_headers config option (default {}) that allows passing custom HTTP headers to all client requests
  • Custom headers are merged into request_headers, enabling use cases like x-contentful-resource-resolution
  • Fully backwards compatible — existing clients are unaffected

Test plan

  • Existing specs pass (39 examples, 0 failures)
  • New specs cover: default value, custom header inclusion, no override of defaults, multiple headers

🤖 Generated with Claude Code

Allow passing custom HTTP headers to the client
via the `additional_headers` configuration option.
Headers are merged into request_headers, enabling
use cases like x-contentful-resource-resolution.
Defaults to empty hash for backwards compatibility.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jasonw-chime Jason Wang (jasonw-chime) requested a review from a team as a code owner March 31, 2026 23:07
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