Skip to content

docs: document paramsSerializer.encode for strict RFC 3986 query encoding (#10809)#10821

Merged
jasonsaayman merged 3 commits intoaxios:v1.xfrom
mixelburg:docs/paramsSerializer-strict-encoding
Apr 30, 2026
Merged

docs: document paramsSerializer.encode for strict RFC 3986 query encoding (#10809)#10821
jasonsaayman merged 3 commits intoaxios:v1.xfrom
mixelburg:docs/paramsSerializer-strict-encoding

Conversation

@mixelburg
Copy link
Copy Markdown
Contributor

@mixelburg mixelburg commented Apr 28, 2026

Fixes #10809

Add a subsection to request-config.md explaining how to use the encode option with encodeURIComponent for backends that require strict percent-encoding of query values.

The default axios encoder decodes %3A, %24, %2C and %20 for readability, which is correct per RFC 3986 but can cause issues with stricter backends. This documents the existing paramsSerializer.encode escape hatch with a clear example.


Summary by cubic

Documents how to use paramsSerializer.encode with encodeURIComponent in axios to emit strict RFC 3986 percent-encoding for query params. Helps users integrate with backends that reject readable characters in query values.

Description

  • Summary of changes: Added a “Strict RFC 3986 percent-encoding” subsection to request-config.md with per-request and instance examples using encodeURIComponent.
  • Reasoning: The default encoder decodes %3A, %24, %2C, and %20 for readability; some backends require strictly percent-encoded values.
  • Additional context: Docs-only; no runtime or API changes.

Docs

  • Updated docs/pages/advanced/request-config.md. No other docs changes needed.

Testing

  • No tests added or changed. Docs-only change; tests not needed.

Semantic version impact

  • Patch: documentation update only, no behavior changes.

Written for commit 6f30bec. Summary will update on new commits. Review in cubic

…ding

Fixes axios#10809

Add a subsection to request-config.md explaining how to use the encode
option with encodeURIComponent for backends that require strict
percent-encoding of query values.

The default axios encoder decodes %3A, %24, %2C and %20 for readability,
which is correct per RFC 3986 but can cause issues with stricter backends.
This documents the existing `paramsSerializer.encode` escape hatch.
@mixelburg mixelburg requested a review from jasonsaayman as a code owner April 28, 2026 22:27
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 added priority::medium A medium priority commit::docs The PR is related to docs labels Apr 30, 2026
@jasonsaayman jasonsaayman force-pushed the docs/paramsSerializer-strict-encoding branch from 9dc6945 to ef96d83 Compare April 30, 2026 16:13
@jasonsaayman jasonsaayman merged commit 79f39e1 into axios:v1.x Apr 30, 2026
22 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::medium A medium priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs: document paramsSerializer.encode for strict RFC 3986 query encoding

2 participants