docs: document paramsSerializer.encode for strict RFC 3986 query encoding (#10809)#10821
Merged
jasonsaayman merged 3 commits intoaxios:v1.xfrom Apr 30, 2026
Merged
Conversation
…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.
9dc6945 to
ef96d83
Compare
jasonsaayman
approved these changes
Apr 30, 2026
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.
Fixes #10809
Add a subsection to
request-config.mdexplaining how to use theencodeoption withencodeURIComponentfor backends that require strict percent-encoding of query values.The default axios encoder decodes
%3A,%24,%2Cand%20for readability, which is correct per RFC 3986 but can cause issues with stricter backends. This documents the existingparamsSerializer.encodeescape hatch with a clear example.Summary by cubic
Documents how to use
paramsSerializer.encodewithencodeURIComponentinaxiosto emit strict RFC 3986 percent-encoding for query params. Helps users integrate with backends that reject readable characters in query values.Description
request-config.mdwith per-request and instance examples usingencodeURIComponent.%3A,%24,%2C, and%20for readability; some backends require strictly percent-encoded values.Docs
docs/pages/advanced/request-config.md. No other docs changes needed.Testing
Semantic version impact
Written for commit 6f30bec. Summary will update on new commits. Review in cubic