public class HttpResponse extends HttpBase<HttpResponse>
body, charset, DEFAULT_BUFFER_SIZE, form, formEncoding, HEADER_ACCEPT, HEADER_ACCEPT_ENCODING, HEADER_CLOSE, HEADER_CONNECTION, HEADER_CONTENT_ENCODING, HEADER_CONTENT_LENGTH, HEADER_CONTENT_TYPE, HEADER_ETAG, HEADER_HOST, HEADER_KEEP_ALIVE, HEADER_USER_AGENT, headers, HTTP_1_0, HTTP_1_1, httpVersion, mediaType| 构造器和说明 |
|---|
HttpResponse() |
| 限定符和类型 | 方法和说明 |
|---|---|
HttpRequest |
getHttpRequest()
获取请求对象
|
int |
getStatusCode()
获取状态码
|
static HttpResponse |
readResponse(InputStream in)
读取响应流
|
void |
setHeader(Map<String,List<String>> headerFields)
设置请求头
|
void |
setHttpRequest(HttpRequest httpRequest)
设置请求对象
|
void |
setStatusCode(int statusCode)
设置状态码
|
accept, accept, acceptEncoding, acceptEncoding, body, body, body, bodyBytes, bodyHtml, bodyText, bodyText, bodyText, bodyText, charset, charset, close, connectionKeepAlive, contentEncoding, contentLength, contentLength, contentType, contentType, contentType, copy, copyLarge, copyLarge, form, formEncoding, header, header, header, header, header, headers, httpVersion, httpVersion, initForm, isConnectionPersistent, mediaType, mediaType, query, query, query, query, readBody, removeHeader, wrapFormValuepublic int getStatusCode()
public void setStatusCode(int statusCode)
statusCode - public static HttpResponse readResponse(InputStream in) throws IOException
in - IOExceptionpublic HttpRequest getHttpRequest()
public void setHttpRequest(HttpRequest httpRequest)
httpRequest - Copyright © 2015. All rights reserved.