Skip to content
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

Optional get params #7

Open
ierehon1905 opened this issue Feb 24, 2022 · 0 comments · May be fixed by #11
Open

Optional get params #7

ierehon1905 opened this issue Feb 24, 2022 · 0 comments · May be fixed by #11
Labels
enhancement New feature or request

Comments

@ierehon1905
Copy link

ierehon1905 commented Feb 24, 2022

Hello, I wonder if params are really always required for GET requests, maybe it would bw possible to make them optional so one can write like

api.get('/foo');
//instead of
api.get('/foo', {});

https://github.com/yandex-cloud/axios-wrapper/blob/e041fbcb410dcf72349709acec673e04a8919765/src/index.ts#L210

if it is possible the similar change would be awesome for others methods

@ierehon1905 ierehon1905 added the enhancement New feature or request label Feb 24, 2022
tsufiev added a commit that referenced this issue Feb 25, 2022
This will allow to not invoke, e.g. `api.get('/foo', {})`, when one can
simply invoke `api.get('/foo')`.

Closes #7.
@tsufiev tsufiev linked a pull request Feb 25, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant