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 Patternprotected Configprivate final HttpRequestSummary -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedRawResponseBase(Config config, HttpRequestSummary summary) -
Method Summary
Modifier and TypeMethodDescriptionprotected Stringprivate StringgetCharsetFromContentType(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, waitMethods 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:RawResponseReturns the current config for this request/response- Specified by:
getConfigin interfaceRawResponse- Returns:
- the config
-
toSummary
Description copied from interface:RawResponsereturns a lightweight read only summary of the response.- Specified by:
toSummaryin interfaceRawResponse- Returns:
- the response summary
-
getRequestSummary
Description copied from interface:RawResponsereturns a lightweight read only summary of the request.- Specified by:
getRequestSummaryin interfaceRawResponse- Returns:
- the request summary
-