-
public interface HttpRequest<T extends Object>http 请求模型。目前支持 get与post。
-
-
Method Summary
Modifier and Type Method Description abstract HttpRequestTypegetType()请求类型。 此类型与 HttpTemplate 中提供的类型一致。 abstract StringgetUrl()请求路径。 abstract Class<T>getResponseType()请求后的响应值类型。可以为null。 如果为null则认为此请求的返回值将被忽略。 abstract HttpHeadersgetHeaders()请求头。可以为null。 abstract ObjectgetRequestParam()请求参数。 如果不是 post/json 类型,则此值需要为一个 Map 。 -
-
Method Detail
-
getType
abstract HttpRequestType getType()
请求类型。 此类型与 HttpTemplate 中提供的类型一致。
-
getResponseType
abstract Class<T> getResponseType()
请求后的响应值类型。可以为null。 如果为null则认为此请求的返回值将被忽略。
-
getHeaders
abstract HttpHeaders getHeaders()
请求头。可以为null。
-
getRequestParam
abstract Object getRequestParam()
请求参数。 如果不是 post/json 类型,则此值需要为一个 Map。
-
-
-
-