Package io.qameta.allure.attachment.http
Class HttpRequestAttachment
java.lang.Object
io.qameta.allure.attachment.http.HttpRequestAttachment
- All Implemented Interfaces:
AttachmentData
Describes an HTTP or RPC request attachment rendered in an Allure report.
Use this model to carry request 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
ConstructorsConstructorDescriptionHttpRequestAttachment(String name, String url, String method, String body, String curl, Map<String, String> headers, Map<String, String> cookies) Creates an HTTP request attachment with the supplied values.HttpRequestAttachment(String name, String url, String method, String body, String curl, Map<String, String> headers, Map<String, String> cookies, Map<String, String> formParams) Creates an HTTP request attachment with the supplied values. -
Method Summary
-
Constructor Details
-
HttpRequestAttachment
public HttpRequestAttachment(String name, String url, String method, String body, String curl, Map<String, String> headers, Map<String, String> cookies) Creates an HTTP request attachment with the supplied values.- Parameters:
name- the display name or logical name to useurl- the request URL or service method namemethod- the framework or Java method to inspectbody- the attachment bodycurl- the curlheaders- the headerscookies- the cookies
-
HttpRequestAttachment
public HttpRequestAttachment(String name, String url, String method, String body, String curl, Map<String, String> headers, Map<String, String> cookies, Map<String, String> formParams) Creates an HTTP request attachment with the supplied values.- Parameters:
name- the display name or logical name to useurl- the request URL or service method namemethod- the framework or Java method to inspectbody- the attachment bodycurl- the curlheaders- the headerscookies- the cookiesformParams- the form params
-
-
Method Details
-
getUrl
Returns the url.- Returns:
- the url
-
getMethod
Returns the method.- Returns:
- the method
-
getBody
Returns the body.- Returns:
- the body
-
getHeaders
Returns the headers.- Returns:
- the headers
-
getCookies
Returns the cookies.- Returns:
- the cookies
-
getFormParams
Returns the form params.- Returns:
- the form params
-
getCurl
Returns the curl.- Returns:
- the curl
-
getName
Returns the name.- Specified by:
getNamein interfaceAttachmentData- Returns:
- the attachment or display name
-
toString
-