fix: get请求query参数传空报错

This commit is contained in:
chenjianxing 2021-02-04 10:19:14 +08:00
parent 07205c4911
commit f3fedcdb05
1 changed files with 3 additions and 0 deletions

View File

@ -290,6 +290,9 @@ public class MsHTTPSamplerProxy extends MsTestElement {
Arguments arguments = new Arguments();
list.stream().filter(KeyValue::isValid).filter(KeyValue::isEnable).forEach(keyValue -> {
HTTPArgument httpArgument = new HTTPArgument(keyValue.getName(), StringUtils.isNotEmpty(keyValue.getValue()) && keyValue.getValue().startsWith("@") ? ScriptEngineUtils.calculate(keyValue.getValue()) : keyValue.getValue());
if (keyValue.getValue() == null) {
httpArgument.setValue("");
}
httpArgument.setAlwaysEncoded(keyValue.isEncode());
if (StringUtils.isNotBlank(keyValue.getContentType())) {
httpArgument.setContentType(keyValue.getContentType());