类 HttpRequestBuilder
java.lang.Object
io.github.wooenrico.http.common.HttpRequestBuilder
Builder for HttpRequest objects.
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明body
(byte[] body) Sets the body for the HttpRequest.build()
Builds the HttpRequest.Adds a header to the HttpRequest.Sets the headers for the HttpRequest.keepAlive
(boolean isKeepAlive) Sets the header for the HttpRequest.Sets the HTTP method for the HttpRequest.Sets the URL for the HttpRequest.Sets the URL parameter for the HttpRequest.
-
构造器详细资料
-
HttpRequestBuilder
public HttpRequestBuilder()
-
-
方法详细资料
-
url
Sets the URL for the HttpRequest.- 参数:
url
- the URL- 返回:
- the builder
-
urlParam
Sets the URL parameter for the HttpRequest.- 参数:
key
- header keyvalue
- header value- 返回:
- the builder
-
method
Sets the HTTP method for the HttpRequest.- 参数:
method
- the HTTP method- 返回:
- the builder
-
body
Sets the body for the HttpRequest.- 参数:
body
- the body bytes- 返回:
- the builder
-
headers
Sets the headers for the HttpRequest.- 参数:
headers
- the headers map- 返回:
- the builder
-
header
Adds a header to the HttpRequest.- 参数:
key
- header keyvalue
- header value- 返回:
- the builder
-
keepAlive
Sets the header for the HttpRequest.- 参数:
isKeepAlive
- is keep alive- 返回:
- the builder
-
build
Builds the HttpRequest.- 返回:
- the HttpRequest
-