Skip to content

Commit 4ae274e

Browse files
committed
docs: Add comment about encoding
1 parent 75477b2 commit 4ae274e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/utils.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ export function appendQueryParams(url: string, params: QueryParams): string {
183183
const queryStringParts = buildParams('', params).join('&');
184184

185185
// Encode special characters as per RFC 3986, https://datatracker.ietf.org/doc/html/rfc3986
186+
// This is for compatibility with server frameworks that expect the literal notation
186187
const encodedQueryString = queryStringParts.replace(/%5B%5D/g, '[]'); // Keep '[]' for arrays
187188

188189
return appendQueryStringToUrl(url, encodedQueryString);

0 commit comments

Comments
 (0)