fix(接口测试): http请求去除空格
This commit is contained in:
parent
27733af365
commit
4f542b3d47
|
@ -334,8 +334,6 @@ export default {
|
||||||
this.sort(this.request.hashTree);
|
this.sort(this.request.hashTree);
|
||||||
},
|
},
|
||||||
setParameter(data) {
|
setParameter(data) {
|
||||||
// 去除Path结尾空格
|
|
||||||
data.path = data.path.trimEnd();
|
|
||||||
data.name = this.currentApi.name;
|
data.name = this.currentApi.name;
|
||||||
data.moduleId = this.currentApi.moduleId;
|
data.moduleId = this.currentApi.moduleId;
|
||||||
data.modulePath = this.currentApi.modulePath;
|
data.modulePath = this.currentApi.modulePath;
|
||||||
|
@ -433,7 +431,6 @@ export default {
|
||||||
setParameters(data) {
|
setParameters(data) {
|
||||||
data.projectId = this.projectId;
|
data.projectId = this.projectId;
|
||||||
this.request.name = this.currentApi.name;
|
this.request.name = this.currentApi.name;
|
||||||
this.request.path = data.path.trimEnd();
|
|
||||||
data.protocol = this.currentProtocol;
|
data.protocol = this.currentProtocol;
|
||||||
data.request = this.request;
|
data.request = this.request;
|
||||||
data.request.name = data.name;
|
data.request.name = data.name;
|
||||||
|
|
|
@ -463,7 +463,7 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
setParameter() {
|
setParameter() {
|
||||||
this.request.path = this.httpForm.path;
|
this.request.path = this.httpForm.path.trimEnd();
|
||||||
this.request.method = this.httpForm.method;
|
this.request.method = this.httpForm.method;
|
||||||
if (this.httpForm && this.httpForm.request) {
|
if (this.httpForm && this.httpForm.request) {
|
||||||
this.httpForm.request.useEnvironment = undefined;
|
this.httpForm.request.useEnvironment = undefined;
|
||||||
|
@ -783,6 +783,9 @@ export default {
|
||||||
if (url) {
|
if (url) {
|
||||||
this.httpForm.path = decodeURIComponent(this.httpForm.path.substr(0, this.httpForm.path.indexOf('?')));
|
this.httpForm.path = decodeURIComponent(this.httpForm.path.substr(0, this.httpForm.path.indexOf('?')));
|
||||||
}
|
}
|
||||||
|
if (this.httpForm.path) {
|
||||||
|
this.httpForm.path = this.httpForm.path.trimEnd();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
addProtocol(url) {
|
addProtocol(url) {
|
||||||
if (url) {
|
if (url) {
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
v-model="api.request.path"
|
v-model="api.request.path"
|
||||||
class="ms-htt-width"
|
class="ms-htt-width"
|
||||||
size="small"
|
size="small"
|
||||||
|
@change="trimPath"
|
||||||
:disabled="false" />
|
:disabled="false" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
@ -872,6 +873,11 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
trimPath() {
|
||||||
|
if (this.api.request.path) {
|
||||||
|
this.api.request.path = this.api.request.path.trimEnd();
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
created() {
|
created() {
|
||||||
|
|
Loading…
Reference in New Issue