diff --git a/package.json b/package.json index 2fbf38d..38b1b1f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@brainylab/fetch-wrapper", - "version": "0.3.3", + "version": "0.3.4", "main": "./index.js", "module": "./index.mjs", "types": "./index.d.ts", diff --git a/src/lib/fetch-wrapper.ts b/src/lib/fetch-wrapper.ts index d864fcf..f23bb12 100644 --- a/src/lib/fetch-wrapper.ts +++ b/src/lib/fetch-wrapper.ts @@ -76,7 +76,8 @@ export class FetchWrapper implements FetchMethods { ? mergeConfigs(this.defaults, init) : (this.defaults as RequestInit); - if (['GET', 'HEAD'].includes(configs.method)) configs.body = undefined; + if (['GET', 'HEAD', 'DELETE'].includes(configs.method)) + configs.body = undefined; const response = await fetch(url, configs);