aspida / aspida

TypeScript friendly HTTP client wrapper for the browser and node.js.

Home Page:https://github.com/aspida/aspida

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[@aspida/axios] axios adds unwanted square brackets to the key of the array query

su8ru opened this issue · comments

Ref. frouriojs/create-frourio-app#355

query: {
  key: [ 'a', 'b', 'c' ]
)

axios は上のような配列形式の query について、key に [] を付して query string を生成してしまいます

Expected
?key=a&key=b&key=c
Actual
?key[]=a&key[]=b&key[]=c

そこで、axios/axios#604 (comment) にあるように、paramsSerializerqs を指定することで、axios 独自の挙動を抑制します