类 HttpResponse
java.lang.Object
io.github.wooenrico.http.common.HttpResponse
HttpResponse Object
-
构造器详细资料
-
HttpResponse
public HttpResponse(int status, String desc, String version, Map<String, List<String>> headers, byte[] body) Constructs a new HttpResponse.- 参数:
status
- the status for the responsedesc
- the desc for the responseversion
- the version for the responseheaders
- the headers for the responsebody
- the body of the response
-
-
方法详细资料
-
getStatus
public int getStatus()Returns the status of the response.- 返回:
- the status of the response
-
getDesc
Returns the desc of the response.- 返回:
- the desc of the response
-
getVersion
Returns the version of the response.- 返回:
- the version of the response
-
getHeaders
Returns the headers of the response.- 返回:
- the headers of the response
-
getBody
public byte[] getBody()Returns the body of the response.- 返回:
- the body of the response
-
prettyString
Returns the response as a pretty string.- 返回:
- the response as a pretty string
-