mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-04-19 03:01:48 +08:00
!337 新增设置map<String, String>提交表单数据
Merge pull request !337 from SIA/v5-dev
This commit is contained in:
commit
37f106dbf2
@ -551,6 +551,19 @@ public class HttpRequest extends HttpBase<HttpRequest> {
|
||||
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>
|
||||
* 一旦有文件加入,表单变为multipart/form-data
|
||||
|
Loading…
x
Reference in New Issue
Block a user