Package de.sstoehr.harreader.model
Class HarResponse
java.lang.Object
de.sstoehr.harreader.model.HarResponse
public class HarResponse extends Object
-
Field Summary
Fields Modifier and Type Field Description protected static LongDEFAULT_SIZE -
Constructor Summary
Constructors Constructor Description HarResponse() -
Method Summary
Modifier and Type Method Description booleanequals(Object o)Map<String,Object>getAdditional()LonggetBodySize()StringgetComment()HarContentgetContent()List<HarCookie>getCookies()List<HarHeader>getHeaders()LonggetHeadersSize()StringgetHttpVersion()StringgetRedirectURL()intgetStatus()StringgetStatusText()inthashCode()voidsetAdditionalField(String name, Object value)voidsetBodySize(Long bodySize)voidsetComment(String comment)voidsetContent(HarContent content)voidsetCookies(List<HarCookie> cookies)voidsetHeaders(List<HarHeader> headers)voidsetHeadersSize(Long headersSize)voidsetHttpVersion(String httpVersion)voidsetRedirectURL(String redirectURL)voidsetStatus(int status)voidsetStatusText(String statusText)
-
Field Details
-
Constructor Details
-
HarResponse
public HarResponse()
-
-
Method Details
-
getStatus
public int getStatus()- Returns:
- Response status, null if not present.
-
setStatus
public void setStatus(int status) -
getStatusText
- Returns:
- Response status description, null if not present.
-
setStatusText
-
getHttpVersion
- Returns:
- Response HTTP Version, null if not present.
-
setHttpVersion
-
getCookies
- Returns:
- List of cookie objects.
-
setCookies
-
getHeaders
- Returns:
- List of header objects.
-
setHeaders
-
getContent
- Returns:
- Details about the response body.
-
setContent
-
getRedirectURL
- Returns:
- Redirection target URL from the Location response header, null if not present.
-
setRedirectURL
-
getHeadersSize
- Returns:
- Total number of bytes from the start of the HTTP response message until (and including) the double
CRLF before the body.
DEFAULT_SIZEif the info is not available.
-
setHeadersSize
-
getBodySize
- Returns:
- Size of the received response body in bytes.
Set to zero in case of responses coming from the cache (304).
DEFAULT_SIZEif the info is not available.
-
setBodySize
-
getComment
- Returns:
- Comment provided by the user or application, null if not present.
-
setComment
-
getAdditional
-
setAdditionalField
-
equals
-
hashCode
public int hashCode()
-