🐛 Fixed a critical bug, clear cookies to take effect
This commit is contained in:
@@ -317,7 +317,11 @@
|
|||||||
<div class="flex-wrap">
|
<div class="flex-wrap">
|
||||||
<label for="auth">Authentication Type</label>
|
<label for="auth">Authentication Type</label>
|
||||||
<div>
|
<div>
|
||||||
<button class="icon" @click="clearContent('auth', $event)" v-tooltip.bottom="'Clear'">
|
<button
|
||||||
|
class="icon"
|
||||||
|
@click="clearContent('auth', $event)"
|
||||||
|
v-tooltip.bottom="'Clear'"
|
||||||
|
>
|
||||||
<i class="material-icons">clear_all</i>
|
<i class="material-icons">clear_all</i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -376,7 +380,11 @@
|
|||||||
<div class="flex-wrap">
|
<div class="flex-wrap">
|
||||||
<label for="headerList">Header List</label>
|
<label for="headerList">Header List</label>
|
||||||
<div>
|
<div>
|
||||||
<button class="icon" @click="clearContent('headers', $event)" v-tooltip.bottom="'Clear'">
|
<button
|
||||||
|
class="icon"
|
||||||
|
@click="clearContent('headers', $event)"
|
||||||
|
v-tooltip.bottom="'Clear'"
|
||||||
|
>
|
||||||
<i class="material-icons">clear_all</i>
|
<i class="material-icons">clear_all</i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -440,7 +448,11 @@
|
|||||||
<div class="flex-wrap">
|
<div class="flex-wrap">
|
||||||
<label for="paramList">Parameter List</label>
|
<label for="paramList">Parameter List</label>
|
||||||
<div>
|
<div>
|
||||||
<button class="icon" @click="clearContent('parameters', $event)" v-tooltip.bottom="'Clear'">
|
<button
|
||||||
|
class="icon"
|
||||||
|
@click="clearContent('parameters', $event)"
|
||||||
|
v-tooltip.bottom="'Clear'"
|
||||||
|
>
|
||||||
<i class="material-icons">clear_all</i>
|
<i class="material-icons">clear_all</i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -1051,15 +1063,13 @@ export default {
|
|||||||
requestString.push(' method: "' + this.method + '",\n');
|
requestString.push(' method: "' + this.method + '",\n');
|
||||||
if (this.auth === "Basic") {
|
if (this.auth === "Basic") {
|
||||||
var basic = this.httpUser + ":" + this.httpPassword;
|
var basic = this.httpUser + ":" + this.httpPassword;
|
||||||
this.$store.commit(
|
headers.push(
|
||||||
"addHeaders",
|
|
||||||
' "Authorization": "Basic ' +
|
' "Authorization": "Basic ' +
|
||||||
window.btoa(unescape(encodeURIComponent(basic))) +
|
window.btoa(unescape(encodeURIComponent(basic))) +
|
||||||
",\n"
|
",\n"
|
||||||
);
|
);
|
||||||
} else if (this.auth === "Bearer Token") {
|
} else if (this.auth === "Bearer Token") {
|
||||||
this.$store.commit(
|
headers.push(
|
||||||
"addHeaders",
|
|
||||||
' "Authorization": "Bearer Token ' + this.bearerToken + ",\n"
|
' "Authorization": "Bearer Token ' + this.bearerToken + ",\n"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -1068,19 +1078,14 @@ export default {
|
|||||||
? this.rawParams
|
? this.rawParams
|
||||||
: this.rawRequestBody;
|
: this.rawRequestBody;
|
||||||
requestString.push(" body: " + requestBody + ",\n");
|
requestString.push(" body: " + requestBody + ",\n");
|
||||||
this.$store.commit(
|
headers.push(' "Content-Length": ' + requestBody.length + ",\n");
|
||||||
"addHeaders",
|
headers.push(
|
||||||
' "Content-Length": ' + requestBody.length + ",\n"
|
|
||||||
);
|
|
||||||
this.$store.commit(
|
|
||||||
"addHeaders",
|
|
||||||
' "Content-Type": "' + this.contentType + '; charset=utf-8",\n'
|
' "Content-Type": "' + this.contentType + '; charset=utf-8",\n'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (this.headers) {
|
if (this.headers) {
|
||||||
this.headers.forEach(function(element) {
|
this.headers.forEach(function(element) {
|
||||||
this.$store.commit(
|
headers.push(
|
||||||
"addHeaders",
|
|
||||||
' "' + element.key + '": "' + element.value + '",\n'
|
' "' + element.key + '": "' + element.value + '",\n'
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@@ -1150,7 +1155,7 @@ export default {
|
|||||||
this.method = method;
|
this.method = method;
|
||||||
this.url = url;
|
this.url = url;
|
||||||
this.path = path;
|
this.path = path;
|
||||||
this.scrollInto('request');
|
this.scrollInto("request");
|
||||||
},
|
},
|
||||||
getVariablesFromPreRequestScript() {
|
getVariablesFromPreRequestScript() {
|
||||||
if (!this.preRequestScript) {
|
if (!this.preRequestScript) {
|
||||||
@@ -1206,7 +1211,7 @@ export default {
|
|||||||
},
|
},
|
||||||
async sendRequest() {
|
async sendRequest() {
|
||||||
this.$toast.clear();
|
this.$toast.clear();
|
||||||
this.scrollInto('response');
|
this.scrollInto("response");
|
||||||
|
|
||||||
if (!this.isValidURL) {
|
if (!this.isValidURL) {
|
||||||
this.$toast.error("URL is not formatted properly", {
|
this.$toast.error("URL is not formatted properly", {
|
||||||
@@ -1673,9 +1678,7 @@ export default {
|
|||||||
icon: "clear_all"
|
icon: "clear_all"
|
||||||
});
|
});
|
||||||
setTimeout(
|
setTimeout(
|
||||||
() =>
|
() => (e.target.innerHTML = '<i class="material-icons">clear_all</i>'),
|
||||||
(e.target.innerHTML =
|
|
||||||
'<i class="material-icons">clear_all</i>'),
|
|
||||||
1000
|
1000
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user