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