Bug/body missing onimport (#2048)

Co-authored-by: liyasthomas <liyascthomas@gmail.com>
This commit is contained in:
Anwarul Islam
2021-12-29 07:16:40 +06:00
committed by GitHub
parent 724e1e4c8f
commit 923c24e3bb
3 changed files with 65 additions and 20 deletions

View File

@@ -84,6 +84,7 @@ const handleImport = () => {
const endpoint = origin + pathname
const headers: HoppRESTHeader[] = []
const params: HoppRESTParam[] = []
const body = parsedCurl.body
if (parsedCurl.query) {
for (const key of Object.keys(parsedCurl.query)) {
const val = parsedCurl.query[key]!
@@ -114,6 +115,7 @@ const handleImport = () => {
})
}
}
const method = parsedCurl.method.toUpperCase()
setRESTRequest(
@@ -131,7 +133,7 @@ const handleImport = () => {
},
body: {
contentType: "application/json",
body: "",
body,
},
})
)