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

Increase user-friendliness of useFetchp for POST requests #8

Open
9ssi7 opened this issue Jan 22, 2023 · 0 comments
Open

Increase user-friendliness of useFetchp for POST requests #8

9ssi7 opened this issue Jan 22, 2023 · 0 comments

Comments

@9ssi7
Copy link
Sponsor

9ssi7 commented Jan 22, 2023

Is your feature request related to a problem? Please describe.
no it's not a problem it's just syntax sugar.

Describe the solution you'd like
I feel like I'm actually using fetch when making a POST request.

For example right now my POST request looks like this:

const { data, error, doFetch, isFetching } = useFetchp('GET', 'localhost:3050/api/auth/v1/register')

doFetch({
	body: JSON.stringify({
		email: 'info@ssibrahimbas.com',
	}),
})

I think we can do it this way:

const { data, error, doFetch, isFetching } = useFetchp('GET', 'localhost:3050/api/auth/v1/register')

doFetch({
	email: 'info@ssibrahimbas.com',
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant