Skip to content

Conversation

@wthompson-njar
Copy link

@wthompson-njar wthompson-njar commented Aug 11, 2025

Description of the Change

Adds support for custom request headers to Request::request() via a new optional parameter $additional_headers = []. This is backwards compatible: existing behavior is unchanged unless a caller passes custom headers. Library-set headers (e.g., Accept, Authorization) take precedence and will overwrite any values for the same keys provided in $additional_headers.

Related Issues: Closes #4 / Closes #17
Related PRs: Supersedes #5 and #16

Benefits

Some integrations require sending extra headers such as:

  • Prefer: maxpagesize=...
  • Content-Encoding: gzip

Allowing callers to pass headers directly avoids expanding the method signature with new dedicated parameters.

Possible Drawbacks

None identified.

Verification Process

  • Manually verified that custom headers are sent and received as expected.
  • Confirmed BC by running existing flows with no $additional_headers.
  • Deployed and tested in production via a fork without issues.

Applicable Issues

#4 and #17

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.

Support sending odata.maxpagesize header Accept-Encoding as Request Header

1 participant