Skip to content

Fix: send Accept: application/json header on all requests (#157) - #158

Merged
derpixler merged 1 commit into
release/3-0-0from
fix/rr/157/set-accept-json-header
Sep 8, 2026
Merged

Fix: send Accept: application/json header on all requests (#157)#158
derpixler merged 1 commit into
release/3-0-0from
fix/rr/157/set-accept-json-header

Conversation

@derpixler

@derpixler derpixler commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Bug Fixes

    • Outgoing requests now include an Accept: application/json header by default.
    • Custom request headers can still override the default value.
  • Tests

    • Added coverage confirming the header is included for GET and POST requests.

@derpixler derpixler self-assigned this Sep 8, 2026
@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (1)
  • main

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: c9329f3b-8983-4a36-9e65-941a2c6063fa

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 338de84a-6753-42ad-9b94-d71848314085

📥 Commits

Reviewing files that changed from the base of the PR and between 19b6268 and af4afc0.

📒 Files selected for processing (2)
  • src/Core/Transport/RequestHandler.php
  • test/Unit/Core/RequestHandlerTest.php

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

RequestHandler::dispatch() now sets Accept: application/json when it creates each request. Caller-provided headers are applied afterward and can override this value. Unit tests verify the header for both get('tickets') and post('tickets', ['title' => 'x']) calls.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to af4af

Requests now default to accepting JSON responses, with caller headers retaining override behavior. GET and POST coverage is included, and no merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding an Accept: application/json header to all requests.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@derpixler
derpixler force-pushed the fix/rr/157/set-accept-json-header branch from 64098ee to a7f76bb Compare September 8, 2026 20:19
@derpixler
derpixler merged commit 65d1619 into release/3-0-0 Sep 8, 2026
4 checks passed
@derpixler
derpixler deleted the fix/rr/157/set-accept-json-header branch September 8, 2026 20:24
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.

1 participant