接口 HttpClientResponse
-
- 所有超级接口:
java.lang.AutoCloseable,java.io.Closeable
public interface HttpClientResponse extends java.io.CloseableRepresents a client-side HTTP response.- 作者:
- mai.jh
-
-
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 voidclose()close response InputStream.java.io.InputStreamgetBody()Return the body of the message as an input stream.HeadergetHeaders()Return the headers of this message.intgetStatusCode()Return the HTTP status code.java.lang.StringgetStatusText()Return the HTTP status text of the response.
-
-
-
方法详细资料
-
getHeaders
Header getHeaders()
Return the headers of this message.- 返回:
- a corresponding HttpHeaders object (never
null)
-
getBody
java.io.InputStream getBody() throws java.io.IOExceptionReturn the body of the message as an input stream.- 返回:
- String response body
- 抛出:
java.io.IOException- IOException
-
getStatusCode
int getStatusCode() throws java.io.IOExceptionReturn the HTTP status code.- 返回:
- the HTTP status as an integer
- 抛出:
java.io.IOException- IOException
-
getStatusText
java.lang.String getStatusText() throws java.io.IOExceptionReturn the HTTP status text of the response.- 返回:
- the HTTP status text
- 抛出:
java.io.IOException- IOException
-
close
void close()
close response InputStream.- 指定者:
close在接口中java.lang.AutoCloseable- 指定者:
close在接口中java.io.Closeable
-
-