- java.lang.Object
-
- org.redkale.net.client.ClientRequest
-
- org.redkale.net.http.WebRequest
-
- 所有已实现的接口:
Serializable
public class WebRequest extends ClientRequest implements Serializable
HttpRequest的缩减版, 只提供部分字段详情见: https://redkale.org
-
-
字段概要
字段 修饰符和类型 字段 说明 protected byte[]
body
protected String
contentType
protected String
contextPath
protected Serializable
currentUserid
protected HttpHeaders
headers
protected String
locale
protected String
method
protected HttpParameters
params
protected String
path
protected String
remoteAddr
protected ConvertType
reqConvertType
protected ConvertType
respConvertType
protected boolean
rpc
protected String
sessionid
-
从类继承的字段 org.redkale.net.client.ClientRequest
createTime, EMPTY_TRACEID, traceid, workThread
-
-
构造器概要
构造器 构造器 说明 WebRequest()
-
方法概要
-
从类继承的方法 org.redkale.net.client.ClientRequest
getCreateTime, getRequestid, getTraceid, isCloseType, isCompleted, isVirtualType, prepare, recycle, traceBytes, workThread
-
-
-
-
字段详细资料
-
rpc
@ConvertColumn(index=13) @Comment("\u662f\u5426RPC\u8bf7\u6c42, \u8be5\u7c7b\u901a\u5e38\u662f\u4e3aRPC\u521b\u5efa\u7684\uff0c\u6545\u9ed8\u8ba4\u662ftrue") protected boolean rpc
-
reqConvertType
@ConvertColumn(index=14) @Comment("\u8bf7\u6c42\u53c2\u6570\u7684ConvertType") protected ConvertType reqConvertType
-
respConvertType
@ConvertColumn(index=15) @Comment("\u8f93\u51fa\u7ed3\u679c\u7684ConvertType") protected ConvertType respConvertType
-
method
@Comment("Method GET/POST/...") @ConvertColumn(index=16) protected String method
-
path
@ConvertColumn(index=17) @Comment("\u8bf7\u6c42\u7684Path") protected String path
-
contextPath
@ConvertColumn(index=18) @Comment("\u8bf7\u6c42\u7684\u524d\u7f00") protected String contextPath
-
remoteAddr
@ConvertColumn(index=19) @Comment("\u5ba2\u6237\u7aefIP") protected String remoteAddr
-
locale
@ConvertColumn(index=20) @Comment("Locale\u56fd\u9645\u5316") protected String locale
-
sessionid
@ConvertColumn(index=21) @Comment("\u4f1a\u8bddID") protected String sessionid
-
contentType
@ConvertColumn(index=22) @Comment("Content-Type") protected String contentType
-
currentUserid
@ConvertColumn(index=23) protected Serializable currentUserid
-
headers
@ConvertColumn(index=24) @Comment("http header\u4fe1\u606f") protected HttpHeaders headers
-
params
@ConvertColumn(index=25) @Comment("\u53c2\u6570\u4fe1\u606f") protected HttpParameters params
-
body
@ConvertColumn(index=26) @Comment("http body\u4fe1\u606f") protected byte[] body
-
-
方法详细资料
-
createPath
public static WebRequest createPath(String path)
-
createPath
public static WebRequest createPath(String path, HttpHeaders header)
-
createPath
public static WebRequest createPath(String path, Object... params)
-
createPath
public static WebRequest createPath(String path, HttpHeaders header, Object... params)
-
createGetPath
public static WebRequest createGetPath(String path)
-
createGetPath
public static WebRequest createGetPath(String path, HttpHeaders header)
-
createGetPath
public static WebRequest createGetPath(String path, Object... params)
-
createGetPath
public static WebRequest createGetPath(String path, HttpHeaders header, Object... params)
-
createPostPath
public static WebRequest createPostPath(String path)
-
createPostPath
public static WebRequest createPostPath(String path, HttpHeaders header)
-
createPostPath
public static WebRequest createPostPath(String path, Object... params)
-
createPostPath
public static WebRequest createPostPath(String path, HttpHeaders header, Object... params)
-
copy
public WebRequest copy()
-
writeTo
public void writeTo(ClientConnection conn, ByteArray array)
- 指定者:
writeTo
在类中ClientRequest
-
containsHeader
protected boolean containsHeader(String name)
-
contentLengthBytes
protected static byte[] contentLengthBytes(byte[] clientBody)
-
requestPath
public String requestPath()
-
formUrlencoded
public WebRequest formUrlencoded()
-
rpc
public WebRequest rpc(boolean rpc)
-
traceid
public WebRequest traceid(String traceid)
- 覆盖:
traceid
在类中ClientRequest
-
path
public WebRequest path(String path)
-
contextPath
public WebRequest contextPath(String contextPath)
-
bothConvertType
public WebRequest bothConvertType(ConvertType convertType)
-
reqConvertType
public WebRequest reqConvertType(ConvertType reqConvertType)
-
respConvertType
public WebRequest respConvertType(ConvertType respConvertType)
-
remoteAddr
public WebRequest remoteAddr(String remoteAddr)
-
locale
public WebRequest locale(String locale)
-
sessionid
public WebRequest sessionid(String sessionid)
-
contentType
public WebRequest contentType(String contentType)
-
currentUserid
public WebRequest currentUserid(Serializable userid)
-
removeHeader
public WebRequest removeHeader(String name)
-
removeParam
public WebRequest removeParam(String name)
-
headers
public WebRequest headers(HttpHeaders header)
-
params
public WebRequest params(HttpParameters params)
-
method
public WebRequest method(String method)
-
addHeader
public WebRequest addHeader(String key, String value)
-
addHeader
public WebRequest addHeader(String key, TextConvert convert, Object value)
-
addHeader
public WebRequest addHeader(String key, Object value)
-
addHeader
public WebRequest addHeader(String key, int value)
-
addHeader
public WebRequest addHeader(String key, long value)
-
setHeader
public WebRequest setHeader(String key, String value)
-
setHeader
public WebRequest setHeader(String key, TextConvert convert, Object value)
-
setHeader
public WebRequest setHeader(String key, Object value)
-
setHeader
public WebRequest setHeader(String key, int value)
-
setHeader
public WebRequest setHeader(String key, long value)
-
param
public WebRequest param(String key, String value)
-
param
public WebRequest param(String key, TextConvert convert, Object value)
-
param
public WebRequest param(String key, Object value)
-
body
public WebRequest body(byte[] body)
-
clearParams
public WebRequest clearParams()
-
clearHeaders
public WebRequest clearHeaders()
-
clearRemoteAddr
public WebRequest clearRemoteAddr()
-
clearLocale
public WebRequest clearLocale()
-
clearSessionid
public WebRequest clearSessionid()
-
clearContentType
public WebRequest clearContentType()
-
isRpc
public boolean isRpc()
-
setRpc
public void setRpc(boolean rpc)
-
setTraceid
public void setTraceid(String traceid)
-
getMethod
public String getMethod()
-
setMethod
public void setMethod(String method)
-
getPath
public String getPath()
-
setPath
public void setPath(String path)
-
getContextPath
public String getContextPath()
-
setContextPath
public void setContextPath(String contextPath)
-
getSessionid
public String getSessionid()
-
setSessionid
public void setSessionid(String sessionid)
-
getRemoteAddr
public String getRemoteAddr()
-
setRemoteAddr
public void setRemoteAddr(String remoteAddr)
-
getLocale
public String getLocale()
-
setLocale
public void setLocale(String locale)
-
getCurrentUserid
public Serializable getCurrentUserid()
-
setCurrentUserid
public void setCurrentUserid(Serializable currentUserid)
-
getContentType
public String getContentType()
-
setContentType
public void setContentType(String contentType)
-
getHeaders
public HttpHeaders getHeaders()
-
setHeaders
public void setHeaders(HttpHeaders headers)
-
getParams
public HttpParameters getParams()
-
setParams
public void setParams(HttpParameters params)
-
getBody
public byte[] getBody()
-
setBody
public void setBody(byte[] body)
-
getReqConvertType
public ConvertType getReqConvertType()
-
setReqConvertType
public void setReqConvertType(ConvertType reqConvertType)
-
getRespConvertType
public ConvertType getRespConvertType()
-
setRespConvertType
public void setRespConvertType(ConvertType respConvertType)
-
-