Update index.vue

This commit is contained in:
Hydrophobefireman 2020-05-10 21:26:44 +05:30 committed by GitHub
parent fec3c309be
commit e0aede3fc4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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