fix: curl parser x-www-form-urlencoded body parsing (#2528)

This commit is contained in:
kyteinsky
2022-07-28 21:03:05 +05:30
committed by GitHub
parent e9576dd339
commit fa0e7f4785
2 changed files with 33 additions and 1 deletions

View File

@@ -93,7 +93,8 @@ export const parseCurlCommand = (curlCommand: string) => {
hasBodyBeenParsed = true
} else if (
rawContentType.includes("application/x-www-form-urlencoded") &&
!!pairs
!!pairs &&
Array.isArray(rawData)
) {
body = pairs.map((p) => p.join(": ")).join("\n") || null
contentType = "application/x-www-form-urlencoded"