Skip to content

Commit

Permalink
fix(http): bracket format for arrays in query strings doesn't work pr…
Browse files Browse the repository at this point in the history
…operly with php
  • Loading branch information
brc-dd authored Sep 4, 2024
1 parent d9fe2e1 commit 91fe4f5
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/http/Http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,7 @@ export class Http {
const xsrfToken
= ['POST', 'PUT', 'PATCH', 'DELETE'].includes(method || '') && (await this.ensureXsrfToken())

const queryString = stringify(
{ ...params, ...query },
{ arrayFormat: 'brackets', encodeValuesOnly: true }
)
const queryString = stringify({ ...params, ...query }, { encodeValuesOnly: true })

return [
`${url}${queryString ? `?${queryString}` : ''}`,
Expand Down

0 comments on commit 91fe4f5

Please sign in to comment.