Package com.ultikits.ultitools.utils
Class SimpleHttpClient
java.lang.Object
com.ultikits.ultitools.utils.SimpleHttpClient
Simple HTTP client implementation using HttpURLConnection.
Replaces Hutool-http to reduce dependency size.
- Since:
- 6.2.0
- Author:
- wisdomme
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static StringbuildFormData(Map<String, Object> data) private static SimpleHttpClient.Responseexecute(String method, String urlStr, Map<String, String> headers, Map<String, Object> formData, String jsonBody) static SimpleHttpClient.Responsestatic SimpleHttpClient.Responsestatic SimpleHttpClient.Responsestatic SimpleHttpClient.Responseprivate static String
-
Constructor Details
-
SimpleHttpClient
public SimpleHttpClient()
-
-
Method Details
-
get
-
get
-
post
-
post
-
execute
-
buildFormData
- Throws:
UnsupportedEncodingException
-
readResponse
- Throws:
IOException
-