public class EsbRequestBean
extends java.lang.Object
限定符和类型 | 字段和说明 |
---|---|
private java.lang.String |
contentType
内容类型, 默认是application/x-www-form-urlencoded; charset=utf-8。
|
private io.vertx.core.http.HttpMethod |
httpMethod
请求的类型,目前只支持GET或者POST。
|
private io.vertx.core.buffer.Buffer |
paramBuffer
请求参数,格式是key1=value1&key2=value2。
|
private long |
requestTimeout
请求超时时间, 单位毫秒, 默认是15秒。
|
private java.lang.String |
url
请求的url,不包括host。
|
构造器和说明 |
---|
EsbRequestBean(java.lang.String url)
创建指定url的EsbRequestBean实例
|
EsbRequestBean(java.lang.String url,
io.vertx.core.buffer.Buffer paramBuffer,
io.vertx.core.http.HttpMethod httpMethod)
创建指定url, paramBuffer和httpMethod的EsbRequestBean实例
|
EsbRequestBean(java.lang.String url,
io.vertx.core.http.HttpMethod httpMethod)
创建指定url和httpMethod的EsbRequestBean实例
|
限定符和类型 | 方法和说明 |
---|---|
java.lang.String |
getContentType()
获取内容类型
|
io.vertx.core.http.HttpMethod |
getHttpMethod()
获取请求的类型,目前只支持GET或者POST。
|
io.vertx.core.buffer.Buffer |
getParamBuffer()
获取请求参数
|
long |
getRequestTimeout()
获取请求超时时间, 单位毫秒
|
java.lang.String |
getUrl()
获取请求的url,不包括host。
|
void |
setContentType(java.lang.String contentType)
设置内容类型
|
void |
setRequestTimeout(long requestTimeout)
设置请求超时时间
|
java.lang.String |
toString()
覆盖toString方法
返回格式(httpMethod: "POST", url: "/abcApi/getUserInfo", paramBuffer: "key1=value1&key2=value2", contentType: "application/x-www-form-urlencoded; charset=utf-8", requestTimeout: 10000)
|
private java.lang.String url
private io.vertx.core.buffer.Buffer paramBuffer
private io.vertx.core.http.HttpMethod httpMethod
private java.lang.String contentType
private long requestTimeout
public EsbRequestBean(java.lang.String url)
url
- 请求的url,不包括host。如果是GET请求,可以在url里携带参数。public EsbRequestBean(java.lang.String url, io.vertx.core.http.HttpMethod httpMethod)
url
- 请求的url,不包括host。如果是GET请求,可以在url里携带参数。httpMethod
- 请求的类型,目前只支持GET或者POSTpublic EsbRequestBean(java.lang.String url, io.vertx.core.buffer.Buffer paramBuffer, io.vertx.core.http.HttpMethod httpMethod)
url
- 请求的url,不包括host。如果是GET请求,可以在url里携带参数。paramBuffer
- 请求参数,格式是key1=value1&key2=value2httpMethod
- 请求的类型,目前只支持GET或者POSTpublic java.lang.String toString()
toString
在类中 java.lang.Object
public java.lang.String getUrl()
public io.vertx.core.buffer.Buffer getParamBuffer()
public io.vertx.core.http.HttpMethod getHttpMethod()
public java.lang.String getContentType()
public void setContentType(java.lang.String contentType)
contentType
- 内容类型public long getRequestTimeout()
public void setRequestTimeout(long requestTimeout)
requestTimeout
- 请求超时时间, 单位毫秒