新增设置map<String, String>提交表单数据

This commit is contained in:
caoxiya 2021-06-02 14:08:40 +08:00
parent d815b0f64e
commit 13fe421a1d

View File

@ -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