Skip to content

Increase user-friendliness of useFetchp for POST requests #8

@salihguru

Description

@salihguru

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',
})

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