Package io.qameta.allure.attachment.http
Class HttpRequestAttachment.Builder
java.lang.Object
io.qameta.allure.attachment.http.HttpRequestAttachment.Builder
- Enclosing class:
HttpRequestAttachment
Builder for HttpRequestAttachment.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a builder from the configured values.Creates a builder for a builder.Sets the body.Sets the cookie.setCookies(Map<String, String> cookies) Sets the cookies.setFormParams(Map<String, String> formParams) Sets the form params.Sets the header.setHeaders(Map<String, String> headers) Sets the headers.Sets the method.Deprecated.scheduled for removal in 3.0 releasewithCookie(String name, String value) Deprecated.scheduled for removal in 3.0 releasewithCookies(Map<String, String> cookies) Deprecated.scheduled for removal in 3.0 releasewithHeader(String name, String value) Deprecated.scheduled for removal in 3.0 releasewithHeaders(Map<String, String> headers) Deprecated.scheduled for removal in 3.0 releasewithMethod(String method) Deprecated.scheduled for removal in 3.0 release
-
Method Details
-
create
Creates a builder for a builder.- Parameters:
attachmentName- the attachment display nameurl- the request URL or service method name- Returns:
- a new builder instance
-
setMethod
Sets the method.- Parameters:
method- the framework or Java method to inspect- Returns:
- this instance for method chaining
-
setHeader
Sets the header.- Parameters:
name- the display name or logical name to usevalue- the value to set- Returns:
- this instance for method chaining
-
setHeaders
Sets the headers.- Parameters:
headers- the headers- Returns:
- this instance for method chaining
-
setCookie
Sets the cookie.- Parameters:
name- the display name or logical name to usevalue- the value to set- Returns:
- this instance for method chaining
-
setCookies
Sets the cookies.- Parameters:
cookies- the cookies- Returns:
- this instance for method chaining
-
setBody
Sets the body.- Parameters:
body- the attachment body- Returns:
- this instance for method chaining
-
setFormParams
Sets the form params.- Parameters:
formParams- the form params- Returns:
- this instance for method chaining
-
withMethod
Deprecated.scheduled for removal in 3.0 releaseUse setter method instead. -
withHeader
Deprecated.scheduled for removal in 3.0 releaseUse setter method instead. -
withHeaders
Deprecated.scheduled for removal in 3.0 releaseUse setter method instead. -
withCookie
Deprecated.scheduled for removal in 3.0 releaseUse setter method instead. -
withCookies
Deprecated.scheduled for removal in 3.0 releaseUse setter method instead. -
withBody
Deprecated.scheduled for removal in 3.0 releaseUse setter method instead. -
build
Builds a builder from the configured values.- Returns:
- the built attachment model
-