mirror of
https://gitee.com/dromara/hutool.git
synced 2025-05-04 20:58:00 +08:00
新增设置map<String, String>提交表单数据
This commit is contained in:
parent
d815b0f64e
commit
13fe421a1d
@ -551,6 +551,19 @@ public class HttpRequest extends HttpBase<HttpRequest> {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置map<String, String>类型表单数据
|
||||||
|
*
|
||||||
|
* @param formMapStr 表单内容
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public HttpRequest formStr(Map<String, String> formMapStr) {
|
||||||
|
if (MapUtil.isNotEmpty(formMapStr)) {
|
||||||
|
formMapStr.forEach(this::form);
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 文件表单项<br>
|
* 文件表单项<br>
|
||||||
* 一旦有文件加入,表单变为multipart/form-data
|
* 一旦有文件加入,表单变为multipart/form-data
|
||||||
|
Loading…
Reference in New Issue
Block a user