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

Sending FormData request with array

FarhanShares opened this issue · comments

Hi!

I'm trying to send form data like this

reqBody: {
name: string,
'permissions[]': number
}

As the backend requires me the key to contain square braces, I did it like this.
The problem with it is that, it only sends only one data, which is expected as of the declaration.

Can I come up with a solution to use this type of use case with aspida?

My bad! I just needed to use number[] instead of number as the 'permissions[]' type.

Thanks for the awesome library.