Package cool.scx.common.http_client
Class ScxHttpClientHelper
java.lang.Object
cool.scx.common.http_client.ScxHttpClientHelper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ScxHttpClientResponsedelete(String uri, ScxHttpClientRequestBody body) deleteAsync(String uri, ScxHttpClientRequestBody body) static ScxHttpClientResponsestatic ScxHttpClientResponsepost(String uri, ScxHttpClientRequestBody body) postAsync(String uri, ScxHttpClientRequestBody body) static ScxHttpClientResponseput(String uri, ScxHttpClientRequestBody body) putAsync(String uri, ScxHttpClientRequestBody body) static ScxHttpClientResponserequest(ScxHttpClientRequest request) requestAsync(ScxHttpClientRequest request)
-
Constructor Details
-
ScxHttpClientHelper
public ScxHttpClientHelper()
-
-
Method Details
-
request
public static ScxHttpClientResponse request(ScxHttpClientRequest request) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
requestAsync
-
get
- Throws:
IOExceptionInterruptedException
-
getAsync
-
post
public static ScxHttpClientResponse post(String uri, ScxHttpClientRequestBody body) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
postAsync
public static CompletableFuture<ScxHttpClientResponse> postAsync(String uri, ScxHttpClientRequestBody body) -
put
public static ScxHttpClientResponse put(String uri, ScxHttpClientRequestBody body) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
putAsync
public static CompletableFuture<ScxHttpClientResponse> putAsync(String uri, ScxHttpClientRequestBody body) -
delete
public static ScxHttpClientResponse delete(String uri, ScxHttpClientRequestBody body) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
deleteAsync
public static CompletableFuture<ScxHttpClientResponse> deleteAsync(String uri, ScxHttpClientRequestBody body)
-