Repository navigation
Conversation
Lets callers send custom HTTP headers with a check request. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the change adding custom HTTP header support.
No open issues 🎉
What changed in this PR
Adds a headers request option so callers can send custom HTTP headers through the shared client request implementation.
Changes:
- Reads optional headers and forwards them to Faraday.
- Adds a check-request test verifying a custom header is sent.
- Documents the new option in the changelog.
| File | Description |
|---|---|
test/freno/client/requests/check_test.rb |
Tests custom header forwarding on a check request. |
lib/freno/client/request.rb |
Stores the headers option and passes it to Faraday. |
CHANGELOG.md |
Announces the new request option. |
Review effort: Balanced (auto)
ubuntu-latest now points to Ubuntu 26.04, where ruby/setup-ruby has no Ruby 3.0 or 3.1 builds. Pin the job to ubuntu-24.04 so the full matrix keeps testing every Ruby the gemspec supports. RuboCop's version floats and new cops are enabled, so newer releases flag existing code. Define the two error classes with the class keyword (Style/EmptyClassDefinition) and drop redundant parentheses (Style/RedundantParentheses). Behavior is unchanged. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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 a
headersoption to client requests, so callers can send custom HTTP headers with a check, for exampleclient.check(..., options: { headers: { "X-Example" => "1" } }). When the option is not given, requests are sent exactly as before.This also fixes CI, which was failing on
mainfor reasons unrelated to this change:ubuntu-latestmoved to Ubuntu 26.04, which has no Ruby 3.0 or 3.1 builds, so the job is pinned toubuntu-24.04. Newer RuboCop releases also flagged three existing lines, which are updated with no behavior change. It is a separate commit, so it can be split out if preferred.