Package kong.unirest.core
Class RawResponseBase
java.lang.Object
kong.unirest.core.RawResponseBase
- All Implemented Interfaces:
RawResponse
- Direct Known Subclasses:
JavaResponse
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Pattern
protected Config
private final HttpRequestSummary
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
RawResponseBase
(Config config, HttpRequestSummary summary) -
Method Summary
Modifier and TypeMethodDescriptionprotected String
private String
getCharsetFromContentType
(String contentType) Parse out a charset from a content type header.Returns the current config for this request/responsereturns a lightweight read only summary of the request.returns a lightweight read only summary of the response.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface kong.unirest.core.RawResponse
getContent, getContentAsBytes, getContentAsString, getContentAsString, getContentReader, getContentType, getEncoding, getHeaders, getStatus, getStatusText, hasContent
-
Field Details
-
CHARSET_PATTERN
-
reqSummary
-
config
-
-
Constructor Details
-
RawResponseBase
-
-
Method Details
-
getCharSet
-
getCharsetFromContentType
Parse out a charset from a content type header.- Parameters:
contentType
- e.g. "text/html; charset=EUC-JP"- Returns:
- "EUC-JP", or null if not found. Charset is trimmed and uppercased.
-
getConfig
Description copied from interface:RawResponse
Returns the current config for this request/response- Specified by:
getConfig
in interfaceRawResponse
- Returns:
- the config
-
toSummary
Description copied from interface:RawResponse
returns a lightweight read only summary of the response.- Specified by:
toSummary
in interfaceRawResponse
- Returns:
- the response summary
-
getRequestSummary
Description copied from interface:RawResponse
returns a lightweight read only summary of the request.- Specified by:
getRequestSummary
in interfaceRawResponse
- Returns:
- the request summary
-