Comparing version 0.3.0 to 0.3.1
{ | ||
"name": "fitch", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"description": "Test using fetch API", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -5,3 +5,3 @@ module.exports = { | ||
{ | ||
body = '', | ||
body, | ||
cache = 'default', | ||
@@ -12,5 +12,8 @@ headers = { 'Content-Type': 'application/json' }, | ||
) { | ||
if (body) { | ||
body = JSON.stringify(body); | ||
} | ||
return { | ||
method, | ||
body: JSON.stringify(body), | ||
body, | ||
cache, | ||
@@ -17,0 +20,0 @@ headers, |
14203
58