mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +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;
|
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…
x
Reference in New Issue
Block a user