Package io.qameta.allure.attachment.http
Class HttpResponseAttachment.Builder
java.lang.Object
io.qameta.allure.attachment.http.HttpResponseAttachment.Builder
- Enclosing class:
HttpResponseAttachment
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.Sets the header.setHeaders(Map<String, String> headers) Sets the headers.setResponseCode(int responseCode) Sets the response code.Sets the url.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 releasewithResponseCode(int responseCode) Deprecated.scheduled for removal in 3.0 releaseDeprecated.scheduled for removal in 3.0 release
-
Method Details
-
create
Creates a builder for a builder.- Parameters:
attachmentName- the attachment display name- Returns:
- a new builder instance
-
setUrl
Sets the url.- Parameters:
url- the request URL or service method name- Returns:
- this instance for method chaining
-
setResponseCode
Sets the response code.- Parameters:
responseCode- the response code- 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
-
withUrl
Deprecated.scheduled for removal in 3.0 releaseUse setter method instead. -
withResponseCode
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
-