Closed dboune closed 6 years ago
Hello Damian,
Thank you for your request. The decision of passing query parameters to the request URL or appending the data to the body is made during the Resource creation. So at the moment it's not possible to react on your suggested query
property to only use query parameters when this field is set.
It could be possible to apply your suggestion, e.g. by wrapping the Resource.requestFn
in an additional function. But I don't going to implement this in v2 anymore. I'm sorry. I'll remember it for v3.
I've added it to #57 and will close this issue. Feel free to open a new one.
I believe it would be helpful if there were either a way to filter the params prior to passing them to axios but after using them in the path without using
paramsSerializer
, or if they were just considered two separate things entirely. I would prefer the latter.Unless I've missed something, without importing a serializer like
qs
and using it inparamsSerializer
it does not seem possible to stripparams
that have been used in the path.The following results in a URL like:
/projects/{projectId}/participants?projectId={projectId}&active=1
Something like the following would feel more intuitive to me. (I'm not intending to suggest key names)