feat(request-hook): allow autofetching for...

POST, PUT, PATCH methods

Closes #13
This commit is contained in:
Dmitriy Pleshevskiy 2020-11-06 04:57:12 +03:00
parent e303485f58
commit a66e10fc1a

View file

@ -15,7 +15,7 @@ export function useRequest<R = Record<string, any>, V = Record<string, any>, P =
config?: RequestConfig<R, V, P>,
) {
invariant(
endpoint.method == Method.GET,
endpoint.method !== Method.DELETE,
`You cannot use useRequest with ${endpoint.method} method`
);