Skip to content

Conversation

markerikson
Copy link
Collaborator

This PR:

  • Fixes content-type header handling for non-JSON values like FormData so that the browser can set the header itself
  • Sets the accept header if given a specific responseHandler

Fixes #4669
Fixes #3870

@codesandbox
Copy link

codesandbox bot commented Oct 22, 2025

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@github-actions
Copy link

github-actions bot commented Oct 22, 2025

size-limit report 📦

Path Size
1. entry point: @reduxjs/toolkit/query (cjs, production.min.cjs) 24.41 KB (+0.33% 🔺)
1. entry point: @reduxjs/toolkit/query/react (cjs, production.min.cjs) 26.66 KB (-0.02% 🔽)
2. entry point: @reduxjs/toolkit/query (without dependencies) (cjs, production.min.cjs) 11 KB (+0.12% 🔺)
3. fetchBaseQuery (.modern.mjs) 4.7 KB (+1.46% 🔺)

@netlify
Copy link

netlify bot commented Oct 22, 2025

Deploy Preview for redux-starter-kit-docs ready!

Name Link
🔨 Latest commit f4ced9d
🔍 Latest deploy log https://app.netlify.com/projects/redux-starter-kit-docs/deploys/68f82be341e673000836b48e
😎 Deploy Preview https://deploy-preview-5112--redux-starter-kit-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@markerikson markerikson force-pushed the bugfix/4669-formdata-headers branch from cce7dc1 to f4ced9d Compare October 22, 2025 00:57
@markerikson markerikson merged commit c490b19 into master Oct 22, 2025
119 of 120 checks passed
@aryaemami59 aryaemami59 deleted the bugfix/4669-formdata-headers branch October 22, 2025 01:18
@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit f4ced9d:

Sandbox Source
@examples-query-react/basic Configuration
@examples-query-react/advanced Configuration
@examples-action-listener/counter Configuration
rtk-esm-cra Configuration

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.

RTK Query - Changing the default header from fetchBaseQuery not working Accept header missing if responseHandler === 'json'

1 participant