public static class Setters.Companion
| Modifier and Type | Method and Description |
|---|---|
Setter |
accept(java.lang.String mediaType)
Get accept setter.
|
Setter |
accept(ContentType contentType)
Getting accept setter.
|
Setter |
baseUri(java.lang.String baseUri)
Getting baseUri setter.
|
Setter |
basicAuth(java.lang.String userName,
java.lang.String password)
Use http basic authentication.
|
Setter |
body(java.lang.String body)
Get requestSpecification body setter.
|
Setter |
body(java.io.Serializable body)
Get requestSpecification body setter.
|
Setter |
contentType(ContentType type)
Get content type setter.
|
Setter |
contentType(java.lang.String type)
Get content type setter.
|
Setter |
cookie(java.lang.String name,
java.lang.String value,
java.lang.String additionalValues)
Get cookie setter.
|
Setter |
cookie(java.lang.String name,
java.lang.String value)
Get cookie setter.
|
Setter |
cookie(java.lang.String name)
Get cookie setter.
|
Setter |
defaultParser(Parser parser)
Register a default predefined parser that will be used if no other parser (registered or pre-defined) matches the response content-type.
|
Setter |
formParam(java.lang.String key,
java.lang.Object value)
Get form param setter.
|
Setter |
header(java.lang.String name,
java.lang.String value)
Get header setter.
|
Setter |
host(java.lang.String host)
Get requestSpecification host setter.
|
Setter |
jsonParam(java.lang.String key,
java.lang.Object value)
Get json param setter.
|
Setter |
multiPart(java.lang.String controlName,
java.lang.String fileName,
java.io.InputStream stream)
Get multi part setter.
|
Setter |
multiPart(java.lang.String controlName,
java.lang.String fileName,
java.io.InputStream stream,
java.lang.String mimeType)
Get multi part setter.
|
Setter |
multiPart(java.io.File file)
Get multi part setter.
|
Setter |
multiPart(java.lang.String controlName,
java.io.File file)
Get multi part setter.
|
Setter |
multiPart(io.restassured.specification.MultiPartSpecification multiPartSpecification)
Get multi part setter.
|
Setter |
noAuth()
Clear all authentication settings.
|
Setter |
oauth1(java.lang.String consumerKey,
java.lang.String consumerSecret,
java.lang.String token,
java.lang.String tokenSecret)
Set all OAuth 1.0 authentication settings.
|
Setter |
oauth2(java.lang.String token)
Set all OAuth 2.0 authentication settings.
|
Setter |
param(java.lang.String key,
java.lang.Object value)
Get param setter.
|
Setter |
parser(java.lang.String contentType,
Parser parser)
Register a content-type to be parsed using a predefined parser.
|
Setter |
path(java.lang.String path)
Get requestSpecification path setter.
|
Setter |
pathParam(java.lang.String key,
java.lang.Object value)
Get path param setter.
|
Setter |
port(int port)
Get requestSpecification port setter.
|
Setter |
protocol(java.lang.String protocol)
Get requestSpecification protocol setter.
|
Setter |
queryParam(java.lang.String key,
java.lang.Object value)
Get query param setter.
|
Setter |
redirects(int max)
Get redirect setter.
|
Setter |
redirects(boolean follow)
Get redirect setter.
|
Setter |
urlEncodingEnabled(boolean isEnabled)
Specifies if RestTest should url encode the URL automatically. Usually, this is recommended but in some cases
(e.g. the query parameters are already be encoded before you provide them to RestTest) then it's useful to disable
URL encoding.
|
public Setter baseUri(java.lang.String baseUri)
Getting baseUri setter.
baseUri - of request.public Setter contentType(ContentType type)
Get content type setter.
type - Content type of the request.public Setter contentType(java.lang.String type)
Get content type setter.
type - Content type of the request.public Setter param(java.lang.String key, java.lang.Object value)
Get param setter.
key - Key of param.value - Value of param.public Setter queryParam(java.lang.String key, java.lang.Object value)
Get query param setter.
key - Key of query param.value - Value of query param.public Setter formParam(java.lang.String key, java.lang.Object value)
Get form param setter.
key - Key of form param.value - Value of form param.public Setter jsonParam(java.lang.String key, java.lang.Object value)
Get json param setter.
key - Key of json param.value - Value of json param.public Setter cookie(java.lang.String name, java.lang.String value, java.lang.String additionalValues)
Get cookie setter.
name - Name of cookie.value - Value of cookie.additionalValues - Additional values of cookie.public Setter cookie(java.lang.String name, java.lang.String value)
Get cookie setter.
name - Name of cookie.value - Value of cookie.public Setter cookie(java.lang.String name)
Get cookie setter.
name - Name of cookie.public Setter header(java.lang.String name, java.lang.String value)
Get header setter.
name - Name of header.value - Value of header.public Setter body(java.lang.String body)
Get requestSpecification body setter.
body - Body of requestSpecification.public Setter body(java.io.Serializable body)
Get requestSpecification body setter.
body - Body of requestSpecification.public Setter protocol(java.lang.String protocol)
Get requestSpecification protocol setter.
protocol - Protocol of requestSpecification.public Setter host(java.lang.String host)
Get requestSpecification host setter.
host - Host of requestSpecification.public Setter path(java.lang.String path)
Get requestSpecification path setter.
path - Path of requestSpecification.public Setter port(int port)
Get requestSpecification port setter.
port - Port of requestSpecification.public Setter pathParam(java.lang.String key, java.lang.Object value)
Get path param setter.
key - Key of path param.value - Value of path param.public Setter multiPart(java.lang.String controlName, java.lang.String fileName, java.io.InputStream stream)
Get multi part setter.
controlName - Control name of the body part. In HTML this is the attribute name of the input tag.fileName - File name of the content you're uploading.stream - Stream you want to requestSpecification.public Setter multiPart(java.lang.String controlName, java.lang.String fileName, java.io.InputStream stream, java.lang.String mimeType)
Get multi part setter.
controlName - Control name of the body part. In HTML this is the attribute name of the input tag.fileName - File name of the content you're uploading.stream - Stream you want to requestSpecification.mimeType - The mime-type.public Setter multiPart(java.io.File file)
Get multi part setter.
file - File to upload.public Setter multiPart(java.lang.String controlName, java.io.File file)
Get multi part setter.
file - File to upload.controlName - Defines the control name of the body part. In HTML this is the attribute name of the input tag.public Setter multiPart(io.restassured.specification.MultiPartSpecification multiPartSpecification)
Get multi part setter.
multiPartSpecification - Multi part specification of your request.public Setter redirects(int max)
Get redirect setter.
max - Maximum count of redirects.public Setter redirects(boolean follow)
Get redirect setter.
follow - Follow redirects.public Setter accept(java.lang.String mediaType)
Get accept setter.
mediaType - Media type of request.public Setter accept(ContentType contentType)
Getting accept setter.
contentType - Content type of request.public Setter urlEncodingEnabled(boolean isEnabled)
Specifies if RestTest should url encode the URL automatically. Usually, this is recommended but in some cases (e.g. the query parameters are already be encoded before you provide them to RestTest) then it's useful to disable URL encoding.
isEnabled - Is URL encoding enabled or disabled.public Setter basicAuth(java.lang.String userName, java.lang.String password)
Use http basic authentication.
userName - User name of your account.password - Password of your account.public Setter oauth1(java.lang.String consumerKey, java.lang.String consumerSecret, java.lang.String token, java.lang.String tokenSecret)
Set all OAuth 1.0 authentication settings.
public Setter oauth2(java.lang.String token)
Set all OAuth 2.0 authentication settings.
public Setter noAuth()
Clear all authentication settings.
public Setter parser(java.lang.String contentType, Parser parser)
Register a content-type to be parsed using a predefined parser.