python-http-client.js (hoppscotch-2.0.0) | : | python-http-client.js (hoppscotch-2.1.0) | ||
---|---|---|---|---|
skipping to change at line 94 | skipping to change at line 94 | |||
}) | }) | |||
} | } | |||
if (formData.length) { | if (formData.length) { | |||
requestString.push(`payload = [${formData.join(",\n ")}]\n`) | requestString.push(`payload = [${formData.join(",\n ")}]\n`) | |||
} | } | |||
} else { | } else { | |||
requestString.push(`paylod = '''${requestBody}'''\n`) | requestString.push(`paylod = '''${requestBody}'''\n`) | |||
} | } | |||
} | } | |||
requestString.push( | requestString.push( | |||
`conn.request("${method}", "${pathName}${queryString}", payload, headers)\ n` | `conn.request("${method}", "${pathName}?${queryString}", payload, headers) \n` | |||
) | ) | |||
requestString.push(`res = conn.getresponse()\n`) | requestString.push(`res = conn.getresponse()\n`) | |||
requestString.push(`data = res.read()\n`) | requestString.push(`data = res.read()\n`) | |||
requestString.push(`print(data.decode("utf-8"))`) | requestString.push(`print(data.decode("utf-8"))`) | |||
return requestString.join("") | return requestString.join("") | |||
}, | }, | |||
} | } | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added |