Package org.eclipse.jetty.client
Class HttpContentResponse
- java.lang.Object
-
- org.eclipse.jetty.client.HttpContentResponse
-
- All Implemented Interfaces:
ContentResponse,Response
@Deprecated(since="2021-05-27") public class HttpContentResponse extends Object implements ContentResponse
Deprecated.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.client.api.Response
Response.AsyncContentListener, Response.BeginListener, Response.CompleteListener, Response.ContentListener, Response.DemandedContentListener, Response.FailureListener, Response.HeaderListener, Response.HeadersListener, Response.Listener, Response.ResponseListener, Response.SuccessListener
-
-
Constructor Summary
Constructors Constructor Description HttpContentResponse(Response response, byte[] content, String mediaType, String encoding)Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanabort(Throwable cause)Deprecated.Attempts to abort the receive of this response.byte[]getContent()Deprecated.StringgetContentAsString()Deprecated.StringgetEncoding()Deprecated.HttpFieldsgetHeaders()Deprecated.<T extends Response.ResponseListener>
List<T>getListeners(Class<T> listenerClass)Deprecated.StringgetMediaType()Deprecated.StringgetReason()Deprecated.RequestgetRequest()Deprecated.intgetStatus()Deprecated.HttpVersiongetVersion()Deprecated.StringtoString()Deprecated.
-
-
-
Method Detail
-
getRequest
public Request getRequest()
Deprecated.- Specified by:
getRequestin interfaceResponse- Returns:
- the request associated with this response
-
getListeners
public <T extends Response.ResponseListener> List<T> getListeners(Class<T> listenerClass)
Deprecated.- Specified by:
getListenersin interfaceResponse- Type Parameters:
T- the type of class- Parameters:
listenerClass- the listener class- Returns:
- the response listener passed to
Request.send(org.eclipse.jetty.client.api.Response.CompleteListener)
-
getVersion
public HttpVersion getVersion()
Deprecated.- Specified by:
getVersionin interfaceResponse- Returns:
- the HTTP version of this response, such as "HTTP/1.1"
-
getStatus
public int getStatus()
Deprecated.
-
getReason
public String getReason()
Deprecated.- Specified by:
getReasonin interfaceResponse- Returns:
- the HTTP reason associated to the
Response.getStatus()
-
getHeaders
public HttpFields getHeaders()
Deprecated.- Specified by:
getHeadersin interfaceResponse- Returns:
- the headers of this response
-
abort
public boolean abort(Throwable cause)
Deprecated.Description copied from interface:ResponseAttempts to abort the receive of this response.
-
getMediaType
public String getMediaType()
Deprecated.- Specified by:
getMediaTypein interfaceContentResponse- Returns:
- the media type of the content, such as "text/html" or "application/octet-stream"
-
getEncoding
public String getEncoding()
Deprecated.- Specified by:
getEncodingin interfaceContentResponse- Returns:
- the encoding of the content, such as "UTF-8"
-
getContent
public byte[] getContent()
Deprecated.- Specified by:
getContentin interfaceContentResponse- Returns:
- the response content
-
getContentAsString
public String getContentAsString()
Deprecated.- Specified by:
getContentAsStringin interfaceContentResponse- Returns:
- the response content as a string, decoding the bytes using the charset
provided by the
Content-Typeheader, if any, or UTF-8.
-
-