接口 HttpClientResponse
- 所有超级接口:
AutoCloseable,Closeable
Represents a client-side HTTP response.
In new version of Apache Http Components,
HttpResponse has been replaced by SimpleHttpResponse.
Cause in this class body content no longer be InputStream anymore, we don't need to close it anymore.- 作者:
- mai.jh
-
方法详细资料
-
getHeaders
Header getHeaders()Return the headers of this message.- 返回:
- a corresponding HttpHeaders object (never
null)
-
getBody
Return the body of the message as an input stream.- 返回:
- String response body
- 抛出:
IOException- IOException
-
getStatusCode
Return the HTTP status code.- 返回:
- the HTTP status as an integer
- 抛出:
IOException- IOException
-
getStatusText
Return the HTTP status text of the response.- 返回:
- the HTTP status text
- 抛出:
IOException- IOException
-
close
void close()close response InputStream.- 指定者:
close在接口中AutoCloseable- 指定者:
close在接口中Closeable
-