Package io.qameta.allure.attachment.http
Class HttpResponseAttachment
java.lang.Object
io.qameta.allure.attachment.http.HttpResponseAttachment
- All Implemented Interfaces:
AttachmentData
Describes an HTTP or RPC response attachment rendered in an Allure report.
Use this model to carry response metadata and body content from client interceptors to attachment renderers and processors.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilder for HttpRequestAttachment. -
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
HttpResponseAttachment
public HttpResponseAttachment(String name, String url, String body, int responseCode, Map<String, String> headers, Map<String, String> cookies) Creates an HTTP response attachment with the supplied values.- Parameters:
name- the display name or logical name to useurl- the request URL or service method namebody- the attachment bodyresponseCode- the response codeheaders- the headerscookies- the cookies
-
-
Method Details
-
getName
Returns the name.- Specified by:
getNamein interfaceAttachmentData- Returns:
- the attachment or display name
-
getUrl
Returns the url.- Returns:
- the url
-
getBody
Returns the body.- Returns:
- the body
-
getResponseCode
public int getResponseCode()Returns the response code.- Returns:
- the response code
-
getHeaders
Returns the headers.- Returns:
- the headers
-
getCookies
Returns the cookies.- Returns:
- the cookies
-
toString
-