Update index.vue
This commit is contained in:
committed by
GitHub
parent
fec3c309be
commit
e0aede3fc4
@@ -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}"`
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user