Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Increase user-friendliness of useFetchp for POST requests #8

@gurusalih

Description

@gurusalih

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: '[email protected]',
	}),
})

I think we can do it this way:

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

doFetch({
	email: '[email protected]',
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions