Lint, ES6, popover for codegen

This commit is contained in:
Liyas Thomas
2020-10-19 18:02:42 +05:30
parent 59974edf80
commit eaeefafe39
12 changed files with 97 additions and 80 deletions

View File

@@ -66,7 +66,7 @@ export const PythonRequestsCodegen = {
requestString.push(`data = ${requestBody}\n`)
} else if (contentType.includes("x-www-form-urlencoded")) {
const formData = []
if (requestBody.indexOf("=") > -1) {
if (requestBody.includes("=")) {
requestBody.split("&").forEach((rq) => {
const [key, val] = rq.split("=")
formData.push(`('${key}', '${val}')`)