feat(request-hook): allow autofetching for...
POST, PUT, PATCH methods Closes #13
This commit is contained in:
parent
e303485f58
commit
a66e10fc1a
1 changed files with 1 additions and 1 deletions
|
@ -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`
|
||||
);
|
||||
|
||||
|
|
Reference in a new issue