public class HttpResponseException extends ClientProtocolException
Constructor and Description |
---|
HttpResponseException(int statusCode,
String reasonPhrase)
Constructs a new instance of
HttpResponseException with the given
status code and reason phrase, and no content bytes or content type. |
HttpResponseException(int statusCode,
String reasonPhrase,
byte[] contentBytes,
org.apache.hc.core5.http.ContentType contentType)
Constructs a new instance of
HttpResponseException with the given
status code, reason phrase, content bytes, and content type. |
Modifier and Type | Method and Description |
---|---|
byte[] |
getContentBytes() |
org.apache.hc.core5.http.ContentType |
getContentType() |
String |
getReasonPhrase() |
int |
getStatusCode() |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public HttpResponseException(int statusCode, String reasonPhrase)
HttpResponseException
with the given
status code and reason phrase, and no content bytes or content type.statusCode
- the HTTP status codereasonPhrase
- the reason phrase associated with the HTTP status codepublic HttpResponseException(int statusCode, String reasonPhrase, byte[] contentBytes, org.apache.hc.core5.http.ContentType contentType)
HttpResponseException
with the given
status code, reason phrase, content bytes, and content type.statusCode
- the HTTP status codereasonPhrase
- the reason phrase associated with the HTTP status codecontentBytes
- the content bytes of the HTTP responsecontentType
- the content type of the HTTP responsepublic int getStatusCode()
public String getReasonPhrase()
public byte[] getContentBytes()
public org.apache.hc.core5.http.ContentType getContentType()
Copyright © 1999–2021 The Apache Software Foundation. All rights reserved.