minor refactor

This commit is contained in:
jamesgeorge007
2019-09-23 23:59:24 +05:30
parent 13be809cfe
commit 901162c8b6

View File

@@ -672,7 +672,7 @@
requestString.push(" -H '" + element.key + ": " + element.value + "' \\\n");
})
}
if (this.method === 'POST' || this.method === 'PUT') {
if (['POST', 'PUT'].includes(this.method)]) {
const requestBody = this.rawInput ? this.rawParams : this.rawRequestBody;
requestString.push(" -H 'Content-Length: " + requestBody.length + "' \\\n")
requestString.push(" -H 'Content-Type: " + this.contentType + "; charset=utf-8' \\\n")