@Documented @MethodLifeCycle(value=RequestLifeCycle.class) @Retention(value=RUNTIME) @Target(value=METHOD) public @interface Request
Modifier and Type | Optional Element and Description |
---|---|
boolean |
async
whether can use async http request or not
|
String |
charset
Charset, Default is UTF-8
|
String |
contentEncoding
Content Encoding
|
String |
contentType
Content Type
|
String[] |
data
请求数据项列表
|
String |
dataType
请求响应后接受的数据类型:
text json xml default value is "auto" |
Class<?> |
decoder
数据反序列化器类
|
String[] |
headers
reqest headers:
use the key-value format: key: value |
Class<?>[] |
interceptor
拦截器类列表
|
String |
keyStore
KeyStore Id
|
boolean |
logEnabled
请求日志开关
|
int |
maxRetryInterval |
long |
progressStep
请求进度步长 (单位:比特)
适用于文件上传/下载 |
int |
retryCount
max count to retry
|
Class |
retryer
Class of retryer
|
String |
sslProtocol
SSL protocol
|
int |
timeout
请求超时时间 (单位毫秒)
|
String |
type
HTTP Method:
GET POST PUT HEAD OPTIONS DELETE PATCH TRACE |
String |
url
目标请求URL [同value属性]
|
String |
userAgent
User Agent
|
String |
value
目标请求URL [同url属性]
|
public abstract String type
public abstract String dataType
public abstract String sslProtocol
public abstract Class retryer
public abstract String contentType
public abstract String contentEncoding
public abstract String userAgent
public abstract String charset
public abstract String[] headers
headers = "Content-Type: application/json"multiple headers
headers = { "Content-Type: application/json", "Accept: text/plain" }variables and parameters
headers = {"Accept: ${value}"}
public abstract Class<?>[] interceptor
public abstract String[] data
public abstract Class<?> decoder
public abstract String keyStore
Copyright © 2020. All rights reserved.