add ProxySelector

This commit is contained in:
Looly
2024-11-29 17:21:08 +08:00
parent 5b129a1a8f
commit c2ea26e40d
19 changed files with 252 additions and 156 deletions

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.dromara.hutool.http;
package org.dromara.hutool.http.client;
import org.dromara.hutool.core.codec.binary.Base64;
import org.dromara.hutool.core.io.IORuntimeException;
@@ -22,8 +22,7 @@ import org.dromara.hutool.core.io.StreamProgress;
import org.dromara.hutool.core.io.file.FileUtil;
import org.dromara.hutool.core.lang.Console;
import org.dromara.hutool.core.util.CharsetUtil;
import org.dromara.hutool.http.client.HttpDownloader;
import org.dromara.hutool.http.client.Request;
import org.dromara.hutool.http.HttpGlobalConfig;
import org.dromara.hutool.http.client.engine.ClientEngineFactory;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;

View File

@@ -14,10 +14,9 @@
* limitations under the License.
*/
package org.dromara.hutool.http;
package org.dromara.hutool.http.client;
import org.dromara.hutool.core.lang.Console;
import org.dromara.hutool.http.client.Request;
import org.dromara.hutool.http.client.engine.jdk.JdkClientEngine;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

View File

@@ -3,10 +3,12 @@ package org.dromara.hutool.http.client;
import org.dromara.hutool.core.lang.Console;
import org.dromara.hutool.http.client.engine.ClientEngineFactory;
import org.dromara.hutool.http.meta.Method;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
public class IssueIB1QHQTest {
@Test
@Disabled
void requestByOkHttpTest() {
for (int i = 0; i < 3; i++) {
String response = ClientEngineFactory.createEngine("OkHttp")

View File

@@ -14,10 +14,10 @@
* limitations under the License.
*/
package org.dromara.hutool.http;
package org.dromara.hutool.http.client;
import org.dromara.hutool.core.lang.Console;
import org.dromara.hutool.http.client.Request;
import org.dromara.hutool.http.HttpUtil;
import org.dromara.hutool.http.meta.HeaderName;
import org.dromara.hutool.http.meta.Method;
import org.dromara.hutool.json.JSONUtil;

View File

@@ -14,10 +14,9 @@
* limitations under the License.
*/
package org.dromara.hutool.http;
package org.dromara.hutool.http.html;
import org.dromara.hutool.core.regex.ReUtil;
import org.dromara.hutool.http.html.HtmlUtil;
import org.dromara.hutool.http.meta.ContentTypeUtil;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

View File

@@ -14,10 +14,9 @@
* limitations under the License.
*/
package org.dromara.hutool.http;
package org.dromara.hutool.http.meta;
import org.dromara.hutool.core.util.CharsetUtil;
import org.dromara.hutool.http.meta.ContentType;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;