diff --git a/src/request-hook.ts b/src/request-hook.ts index bc292d1..2cba9f7 100644 --- a/src/request-hook.ts +++ b/src/request-hook.ts @@ -15,7 +15,7 @@ export function useRequest, V = Record, P = config?: RequestConfig, ) { invariant( - endpoint.method == Method.GET, + endpoint.method !== Method.DELETE, `You cannot use useRequest with ${endpoint.method} method` );