Skip to content

docs: add missing withXSRFToken option to Request Config documentation#7460

Merged
jasonsaayman merged 2 commits intoaxios:v1.xfrom
NETIZEN-11:docs/with-xsrf-token-readme
Mar 2, 2026
Merged

docs: add missing withXSRFToken option to Request Config documentation#7460
jasonsaayman merged 2 commits intoaxios:v1.xfrom
NETIZEN-11:docs/with-xsrf-token-readme

Conversation

@NETIZEN-11
Copy link
Copy Markdown
Contributor

@NETIZEN-11 NETIZEN-11 commented Mar 1, 2026

Description

This PR adds the missing withXSRFToken option to the Request Config documentation.

The withXSRFToken configuration option exists in Axios but is not currently documented in the official Request Config section. This update ensures the documentation accurately reflects the available configuration options.

Changes Made

  • Added documentation entry for withXSRFToken
  • Maintained formatting consistency with existing config options

Related Issue

Closes #7450


Summary by cubic

Adds the missing withXSRFToken option to the Request Config docs and explains how it works with withCredentials. Aligns the README with current Axios behavior and includes a small example.

Description

  • Documented withXSRFToken (default, true/false, function callback).
  • Clarified separation from withCredentials and how to send XSRF headers on cross-origin (set both).
  • Added a usage example.
  • Reason: option exists in Axios but was not documented, causing confusion.

Testing

  • Docs-only change; no tests added or needed.

Written for commit 9349693. Summary will update on new commits.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

@jasonsaayman jasonsaayman self-requested a review March 1, 2026 15:48
@jasonsaayman jasonsaayman added priority::low A low priority issue commit::docs The PR is related to docs labels Mar 1, 2026
Copy link
Copy Markdown
Member

@jasonsaayman jasonsaayman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi 👋

This PR LGTM 🔥 !

Thanks for your contribution to axios

@jasonsaayman jasonsaayman merged commit 84285c8 into axios:v1.x Mar 2, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commit::docs The PR is related to docs priority::low A low priority issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs: Missing withXSRFToken option in Request Config documentation

2 participants