-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
simple configuration causes weird doubletting og req params #14
Comments
i realize it's sorta by design, but when using something like:
readability increases when doing |
Hey, I see what you're saying and I think it's something I've considered before. You're basically saying, for a GET request (or any request) when a param has been used in the URL, exclude it from the payload? There's another post about this kind of thing as well. I wonder if should enable some kind of configuration. Possibly globally and per actions set, i.e.: // global config
ApiCore.configure({ ... })
const actions = {
_config: { ... }, // local config
foo: 'foo/:id'
} Or maybe a syntax:
What do you think? |
I Think its a great idea,
I can understand that there might be outliers and festure triggers on endpoints where you need both, but an endpoint toggle would be great.
Also checkout how apisauce does error normalization and api simplification - could be a good way to enhance a few things.
Also your plugins.upperCase example doesn’t really work as described (plugins cannot be extended as is)
… On 3 Apr 2019, at 11.36, Dave Stewart ***@***.***> wrote:
Hey, I see what you're saying and I think it's something I've considered before.
You're basically saying, for a GET request (or any request) when a param has been used in the URL, exclude it from the payload?
There's another post about this kind of thing as well. I wonder if should enable some kind of configuration. Possibly globally and per actions set, i.e.:
ApiCore.configure({ ... })
const actions = {
_config: { ... }, // rules on how these things could be handled
foo: 'foo/:id''
}
What do you think?
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Jest test:
results in a get request to the endpoint like this:
where it in reality should be:
The text was updated successfully, but these errors were encountered: