修复set方法
This commit is contained in:
@@ -33,7 +33,7 @@ public class HttpParameters implements RestParams, Serializable {
|
|||||||
HttpParameters params = new HttpParameters();
|
HttpParameters params = new HttpParameters();
|
||||||
int len = items.length / 2;
|
int len = items.length / 2;
|
||||||
for (int i = 0; i < len; i++) {
|
for (int i = 0; i < len; i++) {
|
||||||
params.set(items[i * 2], items[i * 2 + 1]);
|
params.put(items[i * 2], items[i * 2 + 1]);
|
||||||
}
|
}
|
||||||
return params;
|
return params;
|
||||||
}
|
}
|
||||||
@@ -125,7 +125,7 @@ public class HttpParameters implements RestParams, Serializable {
|
|||||||
return put(name, (convert == null ? JsonConvert.root() : convert).convertTo(value));
|
return put(name, (convert == null ? JsonConvert.root() : convert).convertTo(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
public HttpParameters set(String name, Object value) {
|
public HttpParameters put(String name, Object value) {
|
||||||
return put(name, JsonConvert.root().convertTo(value));
|
return put(name, JsonConvert.root().convertTo(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -297,7 +297,7 @@ public class HttpSimpleRequest extends ClientRequest implements java.io.Serializ
|
|||||||
if (this.params == null) {
|
if (this.params == null) {
|
||||||
this.params = HttpParameters.create();
|
this.params = HttpParameters.create();
|
||||||
}
|
}
|
||||||
this.params.set(key, value);
|
this.params.put(key, value);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user