refactor: 删除多余代码

This commit is contained in:
chenjianxing 2020-12-03 16:32:27 +08:00
parent f581a5626f
commit 18d2d68486
3 changed files with 4 additions and 8 deletions

View File

@ -17,8 +17,6 @@ public class Body {
private String format;
private List<KeyValue> kvs;
private List<KeyValue> binary;
private Object json;
private String xml;
public final static String KV = "KeyValue";
public final static String FORM_DATA = "Form Data";
@ -37,7 +35,8 @@ public class Body {
}
public boolean isKV() {
if (StringUtils.equals(type, FORM_DATA) || StringUtils.equals(type, WWW_FROM)) {
if (StringUtils.equals(type, FORM_DATA) || StringUtils.equals(type, WWW_FROM)
|| StringUtils.equals(type, BINARY)) {
return true;
} else return false;
}

View File

@ -720,12 +720,9 @@ export class Body extends BaseConfig {
this.type = "KeyValue";
this.raw = undefined;
this.kvs = [];
this.fromUrlencoded = [];
this.binary = [];
this.xml = undefined;
this.json = undefined;
this.set(options);
this.sets({kvs: KeyValue}, {fromUrlencoded: KeyValue}, {binary: KeyValue}, options);
this.sets({kvs: KeyValue}, {binary: KeyValue}, options);
}
isValid() {

@ -1 +1 @@
Subproject commit a22a3005d9bd254793fcf634d72539cbdf31be3a
Subproject commit 8a972a198775b3783ed6e4cef27197e53d1ebdc8