contiamo / restful-react

A consistent, declarative way of interacting with RESTful backends, featuring code-generation from Swagger and OpenAPI specs 🔥
MIT License
1.87k stars 109 forks source link

Support queryParamStringifyOptions on RestfulProvider level #278

Closed ApacheEx closed 4 years ago

ApacheEx commented 4 years ago

Is your feature request related to a problem? Please describe. I think the logic should be similar to queryParams (e.g. you can have lang which will be added to each request automatically). I'd like to have the same possibility for queryParamStringifyOptions, in my case I need to use { arrayFormat: 'brackets' } for each request. It's not comfortable to specify this parameter each time I use array in queryParams.

Describe the solution you'd like The same as we have with queryParams: image

Describe alternatives you've considered Currently, we can add queryParamStringifyOptions to each request where array is used. But as I mentioned, I don't like it :)

Additional context I think it's clear enough already

p.s thanks for awesome library.

fabien0102 commented 4 years ago

This is a very smart idea! I also have the issue but with arrayFormat: "comma" 😁 (I don't know why I didn't thought about this myself ^^)