Package io.qameta.allure.http
Record Class HttpExchangeBody
java.lang.Object
java.lang.Record
io.qameta.allure.http.HttpExchangeBody
- Record Components:
contentType- the body content typeencoding- the body encoding, eitherutf8orbase64value- the body valuesize- the original body sizetruncated- true when the body was truncatedform- form valuesparts- multipart valuesstream- streaming body metadata
public record HttpExchangeBody(String contentType, String encoding, String value, Long size, Boolean truncated, List<HttpExchangeNameValue> form, List<HttpExchangeBodyPart> parts, HttpExchangeStream stream)
extends Record
HTTP body captured in an exchange attachment.
-
Constructor Summary
ConstructorsConstructorDescriptionHttpExchangeBody(String contentType, String encoding, String value, Long size, Boolean truncated, List<HttpExchangeNameValue> form, List<HttpExchangeBodyPart> parts, HttpExchangeStream stream) Creates an instance of aHttpExchangeBodyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecontentTyperecord component.encoding()Returns the value of theencodingrecord component.final booleanIndicates whether some other object is "equal to" this one.form()Returns the value of theformrecord component.static HttpExchangeBodyform(List<HttpExchangeNameValue> form) final inthashCode()Returns a hash code value for this object.parts()Returns the value of thepartsrecord component.size()Returns the value of thesizerecord component.stream()Returns the value of thestreamrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetruncatedrecord component.static HttpExchangeBodyvalue()Returns the value of thevaluerecord component.
-
Constructor Details
-
HttpExchangeBody
public HttpExchangeBody(String contentType, String encoding, String value, Long size, Boolean truncated, List<HttpExchangeNameValue> form, List<HttpExchangeBodyPart> parts, HttpExchangeStream stream) Creates an instance of aHttpExchangeBodyrecord class.- Parameters:
contentType- the value for thecontentTyperecord componentencoding- the value for theencodingrecord componentvalue- the value for thevaluerecord componentsize- the value for thesizerecord componenttruncated- the value for thetruncatedrecord componentform- the value for theformrecord componentparts- the value for thepartsrecord componentstream- the value for thestreamrecord component
-
-
Method Details
-
utf8
-
form
-
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). -
contentType
Returns the value of thecontentTyperecord component.- Returns:
- the value of the
contentTyperecord component
-
encoding
Returns the value of theencodingrecord component.- Returns:
- the value of the
encodingrecord component
-
value
Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-
size
Returns the value of thesizerecord component.- Returns:
- the value of the
sizerecord component
-
truncated
Returns the value of thetruncatedrecord component.- Returns:
- the value of the
truncatedrecord component
-
form
Returns the value of theformrecord component.- Returns:
- the value of the
formrecord component
-
parts
Returns the value of thepartsrecord component.- Returns:
- the value of the
partsrecord component
-
stream
Returns the value of thestreamrecord component.- Returns:
- the value of the
streamrecord component
-