Comparing version 0.1.77 to 0.1.78
@@ -92,16 +92,9 @@ "use strict"; | ||
const methodName = requestInit.method || types_1.HTTPMethod.GET; | ||
if (!!url && methodName !== types_1.HTTPMethod.GET) { | ||
const req = request[methodName.toLowerCase()]; | ||
req(url, requestInit.body); | ||
} | ||
else if (!url && methodName !== types_1.HTTPMethod.GET) { | ||
const req = request[methodName.toLowerCase()]; | ||
const methodLower = methodName.toLowerCase(); | ||
if (methodName !== types_1.HTTPMethod.GET) { | ||
const req = request[methodLower]; | ||
req(requestInit.body); | ||
} | ||
else if (url) { | ||
const req = request[methodName.toLowerCase()]; | ||
req(url); | ||
} | ||
else { | ||
const req = request[methodName.toLowerCase()]; | ||
const req = request[methodLower]; | ||
req(); | ||
@@ -108,0 +101,0 @@ } |
{ | ||
"name": "use-http", | ||
"version": "0.1.77", | ||
"version": "0.1.78", | ||
"homepage": "https://codesandbox.io/embed/km04k9k9x5", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
68891
706