Skip to content

Commit cca18a9

Browse files
chore: generated code for commit 0df4fb28. [skip ci]
algolia/api-clients-automation@0df4fb2 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Clément Vannicatte <[email protected]>
1 parent ec9acbc commit cca18a9

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

packages/algoliasearch/__tests__/algoliasearch.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ describe('api', () => {
2828
})) as unknown as EchoResponse;
2929

3030
expect(req.algoliaAgent).toMatchInlineSnapshot(
31-
`"Algolia%20for%20JavaScript%20(${apiClientVersion});%20Search%20(${apiClientVersion});%20Node.js%20(${process.versions.node})"`
31+
`"Algolia%20for%20JavaScript%20(${apiClientVersion})%3B%20Search%20(${apiClientVersion})%3B%20Node.js%20(${process.versions.node})"`
3232
);
3333
});
3434

packages/client-common/src/createEchoRequester.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export function createEchoRequester({
4444
data: request.data ? JSON.parse(request.data) : undefined,
4545
path,
4646
host,
47-
algoliaAgent: encodeURI(algoliaAgent),
47+
algoliaAgent: encodeURIComponent(algoliaAgent),
4848
searchParams,
4949
};
5050

packages/client-common/src/transporter/helpers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ export function serializeQueryParameters(parameters: QueryParameters): string {
4949
return Object.keys(parameters)
5050
.map(
5151
(key) =>
52-
`${key}=${
52+
`${key}=${encodeURIComponent(
5353
isObjectOrArray(parameters[key])
5454
? JSON.stringify(parameters[key])
5555
: parameters[key]
56-
}`
56+
)}`
5757
)
5858
.join('&');
5959
}

0 commit comments

Comments
 (0)