Package | Description |
---|---|
cn.hutool.core.net.url |
URL相关工具
|
Modifier and Type | Method and Description |
---|---|
UrlQuery |
UrlQuery.add(CharSequence key,
Object value)
增加键值对
|
UrlQuery |
UrlQuery.addAll(Map<? extends CharSequence,?> queryMap)
批量增加键值对
|
UrlQuery |
UrlBuilder.getQuery()
获取查询语句,例如a=1&b=2
可能为 null |
static UrlQuery |
UrlQuery.of(Map<? extends CharSequence,?> queryMap)
构建UrlQuery
|
static UrlQuery |
UrlQuery.of(Map<? extends CharSequence,?> queryMap,
boolean isFormUrlEncoded)
构建UrlQuery
|
static UrlQuery |
UrlQuery.of(String queryStr,
Charset charset)
构建UrlQuery
|
static UrlQuery |
UrlQuery.of(String queryStr,
Charset charset,
boolean autoRemovePath)
构建UrlQuery
|
static UrlQuery |
UrlQuery.of(String queryStr,
Charset charset,
boolean autoRemovePath,
boolean isFormUrlEncoded)
构建UrlQuery
|
UrlQuery |
UrlQuery.parse(String queryStr,
Charset charset)
解析URL中的查询字符串
|
UrlQuery |
UrlQuery.parse(String queryStr,
Charset charset,
boolean autoRemovePath)
解析URL中的查询字符串
|
UrlQuery |
UrlQuery.remove(CharSequence key)
移除键及对应所有的值
|
UrlQuery |
UrlQuery.setStrict(boolean strict)
设置是否严格模式
|
Modifier and Type | Method and Description |
---|---|
static UrlBuilder |
UrlBuilder.of(String scheme,
String host,
int port,
UrlPath path,
UrlQuery query,
String fragment,
Charset charset)
构建UrlBuilder
|
UrlBuilder |
UrlBuilder.setQuery(UrlQuery query)
设置查询语句,例如a=1&b=2,将覆盖之前所有的query相关设置
|
Constructor and Description |
---|
UrlBuilder(String scheme,
String host,
int port,
UrlPath path,
UrlQuery query,
String fragment,
Charset charset)
构造
|
Copyright © 2024. All rights reserved.