minor refactor

This commit is contained in:
jamesgeorge007
2019-09-23 23:58:52 +05:30
parent 8857821716
commit 13be809cfe

View File

@@ -632,7 +632,7 @@
} else if (this.auth === 'Bearer Token') {
headers.push(' "Authorization": "Bearer Token ' + this.bearerToken + ',\n')
}
if (this.method === 'POST' || this.method === 'PUT') {
if (['POST', 'PUT'].includes(this.method)]) {
const requestBody = this.rawInput ? this.rawParams : this.rawRequestBody;
requestString.push(' body: ' + requestBody + ',\n')
headers.push(' "Content-Length": ' + requestBody.length + ',\n')