Record Class HarResponse
java.lang.Object
java.lang.Record
de.sstoehr.harreader.model.HarResponse
public record HarResponse(int status, @Nullable String statusText, @Nullable String httpVersion, @Nonnull List<HarCookie> cookies, @Nonnull List<HarHeader> headers, @Nonnull HarContent content, @Nullable String redirectURL, @Nonnull Long headersSize, @Nonnull Long bodySize, @Nullable String comment, @Nonnull Map<String,Object> additional)
extends Record
Information about a performed response.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionHarResponse(int status, String statusText, String httpVersion, List<HarCookie> cookies, List<HarHeader> headers, HarContent content, String redirectURL, Long headersSize, Long bodySize, String comment, Map<String, Object> additional) Creates an instance of aHarResponserecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theadditionalrecord component.bodySize()Returns the value of thebodySizerecord component.comment()Returns the value of thecommentrecord component.content()Returns the value of thecontentrecord component.cookies()Returns the value of thecookiesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.headers()Returns the value of theheadersrecord component.Returns the value of theheadersSizerecord component.Returns the value of thehttpVersionrecord component.Returns the value of theredirectURLrecord component.voidsetAdditionalField(String key, Object value) intstatus()Returns the value of thestatusrecord component.Returns the value of thestatusTextrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
DEFAULT_SIZE
-
-
Constructor Details
-
HarResponse
public HarResponse() -
HarResponse
public HarResponse(int status, @Nullable String statusText, @Nullable String httpVersion, @Nullable List<HarCookie> cookies, @Nullable List<HarHeader> headers, @Nullable HarContent content, @Nullable String redirectURL, @Nullable Long headersSize, @Nullable Long bodySize, @Nullable String comment, @Nullable Map<String, Object> additional) Creates an instance of aHarResponserecord class.- Parameters:
status- the value for thestatusrecord componentstatusText- the value for thestatusTextrecord componenthttpVersion- the value for thehttpVersionrecord componentcookies- the value for thecookiesrecord componentheaders- the value for theheadersrecord componentcontent- the value for thecontentrecord componentredirectURL- the value for theredirectURLrecord componentheadersSize- the value for theheadersSizerecord componentbodySize- the value for thebodySizerecord componentcomment- the value for thecommentrecord componentadditional- the value for theadditionalrecord component
-
-
Method Details
-
httpStatus
-
additional
-
setAdditionalField
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
status
public int status()Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-
statusText
Returns the value of thestatusTextrecord component.- Returns:
- the value of the
statusTextrecord component
-
httpVersion
Returns the value of thehttpVersionrecord component.- Returns:
- the value of the
httpVersionrecord component
-
cookies
-
headers
-
content
Returns the value of thecontentrecord component.- Returns:
- the value of the
contentrecord component
-
redirectURL
Returns the value of theredirectURLrecord component.- Returns:
- the value of the
redirectURLrecord component
-
headersSize
Returns the value of theheadersSizerecord component.- Returns:
- the value of the
headersSizerecord component
-
bodySize
Returns the value of thebodySizerecord component.- Returns:
- the value of the
bodySizerecord component
-
comment
Returns the value of thecommentrecord component.- Returns:
- the value of the
commentrecord component
-