类 HttpRequest
java.lang.Object
io.github.wooenrico.http.common.HttpRequest
HttpRequest Object
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明byte[]
getBody()
Returns the body of the request.Returns the headers of the request.Returns the HTTP method of the request.getUrl()
Returns the URL of the request.Returns a pretty string representation of the HTTP request.toString()
Returns a string representation of the HTTP request.
-
构造器详细资料
-
HttpRequest
Constructs a new HttpRequest.- 参数:
url
- the URL for the requestmethod
- the HTTP method for the requestheaders
- the headers for the requestbody
- the body of the request
-
-
方法详细资料
-
getUrl
Returns the URL of the request.- 返回:
- the URL of the request
-
getMethod
Returns the HTTP method of the request.- 返回:
- the HTTP method of the request
-
getHeaders
Returns the headers of the request.- 返回:
- the headers of the request
-
getBody
public byte[] getBody()Returns the body of the request.- 返回:
- the body of the request
-
toString
Returns a string representation of the HTTP request. -
prettyString
Returns a pretty string representation of the HTTP request.- 返回:
- a pretty string representation of the HTTP request
-