Package io.qameta.allure.http
Record Class HttpExchangeResponse
java.lang.Object
java.lang.Record
io.qameta.allure.http.HttpExchangeResponse
- Record Components:
status- the response status codestatusText- the response status texthttpVersion- the HTTP version- the response cookiesheaders- the response headersbody- the response bodytrailers- the response trailersinformationalResponses- the informational responses
public record HttpExchangeResponse(Integer status, String statusText, String httpVersion, List<HttpExchangeCookie> cookies, List<HttpExchangeNameValue> headers, HttpExchangeBody body, List<HttpExchangeNameValue> trailers, List<HttpExchangeInformationalResponse> informationalResponses)
extends Record
HTTP response captured in an exchange attachment.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionHttpExchangeResponse(Integer status, String statusText, String httpVersion, List<HttpExchangeCookie> cookies, List<HttpExchangeNameValue> headers, HttpExchangeBody body, List<HttpExchangeNameValue> trailers, List<HttpExchangeInformationalResponse> informationalResponses) Creates an instance of aHttpExchangeResponserecord class. -
Method Summary
Modifier and TypeMethodDescriptionbody()Returns the value of thebodyrecord component.static HttpExchangeResponse.Builderbuilder()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 thehttpVersionrecord component.Returns the value of theinformationalResponsesrecord component.status()Returns the value of thestatusrecord component.Returns the value of thestatusTextrecord component.final StringtoString()Returns a string representation of this record class.trailers()Returns the value of thetrailersrecord component.
-
Constructor Details
-
HttpExchangeResponse
public HttpExchangeResponse(Integer status, String statusText, String httpVersion, List<HttpExchangeCookie> cookies, List<HttpExchangeNameValue> headers, HttpExchangeBody body, List<HttpExchangeNameValue> trailers, List<HttpExchangeInformationalResponse> informationalResponses) Creates an instance of aHttpExchangeResponserecord 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 componentbody- the value for thebodyrecord componenttrailers- the value for thetrailersrecord componentinformationalResponses- the value for theinformationalResponsesrecord component
-
-
Method Details
-
builder
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. All components in this record class are compared withObjects::equals(Object,Object). -
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
Returns the value of thecookiesrecord component.- Returns:
- the value of the
cookiesrecord component
-
headers
Returns the value of theheadersrecord component.- Returns:
- the value of the
headersrecord component
-
body
Returns the value of thebodyrecord component.- Returns:
- the value of the
bodyrecord component
-
trailers
Returns the value of thetrailersrecord component.- Returns:
- the value of the
trailersrecord component
-
informationalResponses
Returns the value of theinformationalResponsesrecord component.- Returns:
- the value of the
informationalResponsesrecord component
-