Update index.vue

This commit is contained in:
Hydrophobefireman
2020-05-10 21:26:44 +05:30
committed by GitHub
parent fec3c309be
commit e0aede3fc4

View File

@@ -1938,7 +1938,7 @@ export default {
if (["POST", "PUT", "PATCH"].includes(this.method)) { if (["POST", "PUT", "PATCH"].includes(this.method)) {
let requestBody = this.rawInput ? this.rawParams : this.rawRequestBody let requestBody = this.rawInput ? this.rawParams : this.rawRequestBody
if (this.contentType.includes("json")) { if (this.contentType.includes("json")) {
requestBody = `JSON.stringify("${requestBody}")` requestBody = `JSON.stringify(${requestBody})`
} else if (this.contentType.includes("x-www-form-urlencoded")) { } else if (this.contentType.includes("x-www-form-urlencoded")) {
requestBody = `"${requestBody}"` requestBody = `"${requestBody}"`
} }
@@ -1967,7 +1967,7 @@ export default {
if (["POST", "PUT", "PATCH"].includes(this.method)) { if (["POST", "PUT", "PATCH"].includes(this.method)) {
let requestBody = this.rawInput ? this.rawParams : this.rawRequestBody let requestBody = this.rawInput ? this.rawParams : this.rawRequestBody
if (this.contentType.includes("json")) { if (this.contentType.includes("json")) {
requestBody = `JSON.stringify("${requestBody}")` requestBody = `JSON.stringify(${requestBody})`
} else if (this.contentType.includes("x-www-form-urlencoded")) { } else if (this.contentType.includes("x-www-form-urlencoded")) {
requestBody = `"${requestBody}"` requestBody = `"${requestBody}"`
} }