public final class CloseableHttpResponse extends Object implements org.apache.hc.core5.http.ClassicHttpResponse, org.apache.hc.core5.io.ModalCloseable
| Modifier and Type | Method and Description |
|---|---|
static CloseableHttpResponse |
adapt(org.apache.hc.core5.http.ClassicHttpResponse response) |
void |
addHeader(org.apache.hc.core5.http.Header header) |
void |
addHeader(String name,
Object value) |
void |
close() |
void |
close(org.apache.hc.core5.io.CloseMode closeMode) |
boolean |
containsHeader(String name) |
int |
countHeaders(String name) |
int |
getCode() |
org.apache.hc.core5.http.HttpEntity |
getEntity() |
org.apache.hc.core5.http.Header |
getFirstHeader(String name) |
org.apache.hc.core5.http.Header |
getHeader(String name) |
org.apache.hc.core5.http.Header[] |
getHeaders() |
org.apache.hc.core5.http.Header[] |
getHeaders(String name) |
org.apache.hc.core5.http.Header |
getLastHeader(String name) |
Locale |
getLocale() |
String |
getReasonPhrase() |
org.apache.hc.core5.http.ProtocolVersion |
getVersion() |
Iterator<org.apache.hc.core5.http.Header> |
headerIterator() |
Iterator<org.apache.hc.core5.http.Header> |
headerIterator(String name) |
boolean |
removeHeader(org.apache.hc.core5.http.Header header) |
boolean |
removeHeaders(String name) |
void |
setCode(int code) |
void |
setEntity(org.apache.hc.core5.http.HttpEntity entity) |
void |
setHeader(org.apache.hc.core5.http.Header header) |
void |
setHeader(String name,
Object value) |
void |
setHeaders(org.apache.hc.core5.http.Header... headers) |
void |
setLocale(Locale loc) |
void |
setReasonPhrase(String reason) |
void |
setVersion(org.apache.hc.core5.http.ProtocolVersion version) |
String |
toString() |
@Internal public static CloseableHttpResponse adapt(org.apache.hc.core5.http.ClassicHttpResponse response)
public int getCode()
getCode in interface org.apache.hc.core5.http.HttpResponsepublic org.apache.hc.core5.http.HttpEntity getEntity()
getEntity in interface org.apache.hc.core5.http.HttpEntityContainerpublic boolean containsHeader(String name)
containsHeader in interface org.apache.hc.core5.http.MessageHeaderspublic void setVersion(org.apache.hc.core5.http.ProtocolVersion version)
setVersion in interface org.apache.hc.core5.http.HttpMessagepublic void setCode(int code)
setCode in interface org.apache.hc.core5.http.HttpResponsepublic String getReasonPhrase()
getReasonPhrase in interface org.apache.hc.core5.http.HttpResponsepublic int countHeaders(String name)
countHeaders in interface org.apache.hc.core5.http.MessageHeaderspublic void setEntity(org.apache.hc.core5.http.HttpEntity entity)
setEntity in interface org.apache.hc.core5.http.HttpEntityContainerpublic org.apache.hc.core5.http.ProtocolVersion getVersion()
getVersion in interface org.apache.hc.core5.http.HttpMessagepublic void setReasonPhrase(String reason)
setReasonPhrase in interface org.apache.hc.core5.http.HttpResponsepublic org.apache.hc.core5.http.Header[] getHeaders(String name)
getHeaders in interface org.apache.hc.core5.http.MessageHeaderspublic void addHeader(org.apache.hc.core5.http.Header header)
addHeader in interface org.apache.hc.core5.http.HttpMessagepublic Locale getLocale()
getLocale in interface org.apache.hc.core5.http.HttpResponsepublic void addHeader(String name, Object value)
addHeader in interface org.apache.hc.core5.http.HttpMessagepublic void setLocale(Locale loc)
setLocale in interface org.apache.hc.core5.http.HttpResponsepublic org.apache.hc.core5.http.Header getHeader(String name) throws org.apache.hc.core5.http.ProtocolException
getHeader in interface org.apache.hc.core5.http.MessageHeadersorg.apache.hc.core5.http.ProtocolExceptionpublic void setHeader(org.apache.hc.core5.http.Header header)
setHeader in interface org.apache.hc.core5.http.HttpMessagepublic org.apache.hc.core5.http.Header getFirstHeader(String name)
getFirstHeader in interface org.apache.hc.core5.http.MessageHeaderspublic void setHeader(String name, Object value)
setHeader in interface org.apache.hc.core5.http.HttpMessagepublic void setHeaders(org.apache.hc.core5.http.Header... headers)
setHeaders in interface org.apache.hc.core5.http.HttpMessagepublic boolean removeHeader(org.apache.hc.core5.http.Header header)
removeHeader in interface org.apache.hc.core5.http.HttpMessagepublic boolean removeHeaders(String name)
removeHeaders in interface org.apache.hc.core5.http.HttpMessagepublic org.apache.hc.core5.http.Header getLastHeader(String name)
getLastHeader in interface org.apache.hc.core5.http.MessageHeaderspublic org.apache.hc.core5.http.Header[] getHeaders()
getHeaders in interface org.apache.hc.core5.http.MessageHeaderspublic Iterator<org.apache.hc.core5.http.Header> headerIterator()
headerIterator in interface org.apache.hc.core5.http.MessageHeaderspublic Iterator<org.apache.hc.core5.http.Header> headerIterator(String name)
headerIterator in interface org.apache.hc.core5.http.MessageHeaderspublic void close(org.apache.hc.core5.io.CloseMode closeMode)
close in interface org.apache.hc.core5.io.ModalCloseablepublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 1999–2021 The Apache Software Foundation. All rights reserved.