Skip to content

Commit

Permalink
Fix for bug with accepting FormData as body
Browse files Browse the repository at this point in the history
- Added .eslintignore file.
- Updated the .eslintrc.json file.
- Updated depencencies.
- Reconfigured the transportr.tests.js file to use test.concurrent.
- Added a test to check if the request body is removed when the request method is GET.
- Added code to remove the content-type header and request body if the request method is GET.
- Changed the private methods to use regular objects instead of FormData, Headers, and URLSearchParams.
- Added a check for the response in the catch block of the fetch call to ensure that another error isn't thrown.
  • Loading branch information
D1g1talEntr0py committed Mar 27, 2023
1 parent 5b5fe3f commit a651128
Show file tree
Hide file tree
Showing 6 changed files with 271 additions and 225 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
@@ -0,0 +1,2 @@
/tests/coverage/**
/dist/**
9 changes: 6 additions & 3 deletions .eslintrc.json
Expand Up @@ -2,7 +2,8 @@
"env": {
"browser": true,
"es2022": true,
"node": true
"node": true,
"jest": true
},
"plugins": [
"compat",
Expand All @@ -15,7 +16,7 @@
],
"overrides": [],
"parserOptions": {
"ecmaVersion": 2022,
"ecmaVersion": "latest",
"sourceType": "module"
},
"rules": {
Expand Down Expand Up @@ -47,7 +48,9 @@
"object": "Object",
"responseHandler": "ResponseHandler",
"responseBody": "ResponseBody",
"ResponseStatus": "ResponseStatus"
"responseStatus": "ResponseStatus",
"typeConverter": "TypeConverter",
"propertyTypeConverter": "PropertyTypeConverter"
},
"structuredTags": {
"template": {
Expand Down

0 comments on commit a651128

Please sign in to comment.