fix(接口自动化): 修复DELETE参数丢失问题
This commit is contained in:
parent
cf013c1e84
commit
46737136d9
|
@ -18,6 +18,7 @@ import org.apache.jmeter.protocol.http.control.Header;
|
|||
import org.apache.jmeter.protocol.http.control.HeaderManager;
|
||||
import org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy;
|
||||
import org.apache.jmeter.protocol.http.util.HTTPArgument;
|
||||
import org.apache.jmeter.protocol.http.util.HTTPConstants;
|
||||
import org.apache.jmeter.save.SaveService;
|
||||
import org.apache.jmeter.testelement.TestElement;
|
||||
import org.apache.jorphan.collections.HashTree;
|
||||
|
@ -152,7 +153,14 @@ public class MsHTTPSamplerProxy extends MsTestElement {
|
|||
sampler.setPath(envPath);
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(this.getArguments())) {
|
||||
sampler.setPath(getPostQueryParameters(URLDecoder.decode(envPath, "UTF-8")));
|
||||
String path = getPostQueryParameters(URLDecoder.decode(envPath, "UTF-8"));
|
||||
if (HTTPConstants.DELETE.equals(this.getMethod())) {
|
||||
if (!path.startsWith("/")) {
|
||||
path = "/" + path;
|
||||
}
|
||||
path = sampler.getProtocol() + "://" + sampler.getDomain() + ":" + sampler.getPort() + path;
|
||||
}
|
||||
sampler.setPath(path);
|
||||
}
|
||||
} else {
|
||||
String url = this.getUrl();
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
</div>
|
||||
</el-col>
|
||||
<el-col :span="1" v-if="!(isReadOnly || isCaseEdit)">
|
||||
<el-button size="small" type="primary" @click="addCase">+{{$t('api_test.definition.request.case')}}</el-button>
|
||||
<el-button size="small" type="primary" @click="addCase" v-tester>+{{$t('api_test.definition.request.case')}}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
|
Loading…
Reference in New Issue