Package com.imyeyu.network
Class CommonRequest
java.lang.Object
com.imyeyu.network.CommonRequest
- Direct Known Subclasses:
JacksonRequest
- Since:
- 2025-07-15 14:27
- Author:
- 夜雨
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.apache.hc.client5.http.fluent.Requestprotected com.imyeyu.java.bean.CallbackArg<org.apache.hc.core5.http.HttpResponse> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCommonRequest(org.apache.hc.client5.http.fluent.Request request) -
Method Summary
Modifier and TypeMethodDescriptionbyte[]asBytes()asNumber()asStream()asString()bodyEntity(org.apache.hc.core5.http.HttpEntity entity) voidexecute()static CommonRequestprotected <T> ThandleResponse(org.apache.hc.core5.http.io.HttpClientResponseHandler<T> handler) static CommonRequestresponseCallback(com.imyeyu.java.bean.CallbackArg<org.apache.hc.core5.http.HttpResponse> callback) timeout(long ms) static CommonRequestwrap(org.apache.hc.client5.http.fluent.Request request)
-
Field Details
-
request
protected final org.apache.hc.client5.http.fluent.Request request -
responseCallback
protected com.imyeyu.java.bean.CallbackArg<org.apache.hc.core5.http.HttpResponse> responseCallback
-
-
Constructor Details
-
CommonRequest
protected CommonRequest(org.apache.hc.client5.http.fluent.Request request)
-
-
Method Details
-
wrap
-
get
-
post
-
timeout
-
header
-
token
-
language
-
responseCallback
public CommonRequest responseCallback(com.imyeyu.java.bean.CallbackArg<org.apache.hc.core5.http.HttpResponse> callback) -
bodyEntity
-
asString
- Throws:
IOException
-
asNumber
- Throws:
IOException
-
asBytes
- Throws:
IOException
-
asStream
- Throws:
IOException
-
execute
- Throws:
IOException
-
handleResponse
protected <T> T handleResponse(org.apache.hc.core5.http.io.HttpClientResponseHandler<T> handler) throws IOException - Throws:
IOException
-