feat:【infra 基础设施】支持私有桶

This commit is contained in:
YunaiV
2025-08-18 00:02:03 +08:00
parent 4c5134ae1c
commit 97a981c294
12 changed files with 141 additions and 63 deletions

View File

@@ -47,8 +47,15 @@ public class HttpUtils {
return builder.build();
}
private String append(String base, Map<String, ?> query, boolean fragment) {
return append(base, query, null, fragment);
public static String removeUrlQuery(String url) {
if (!StrUtil.contains(url, '?')) {
return url;
}
UrlBuilder builder = UrlBuilder.of(url, Charset.defaultCharset());
// 移除 query、fragment
builder.setQuery(null);
builder.setFragment(null);
return builder.build();
}
/**