public class Setters
Abstract class for using static functions to call setters.
| Modifier and Type | Class and Description |
|---|---|
static class |
Setters.Companion |
| Modifier and Type | Field and Description |
|---|---|
static Setters.Companion |
Companion |
| Constructor and Description |
|---|
Setters()
Abstract class for using static functions to call setters.
|
| Modifier and Type | Method and Description |
|---|---|
static Setter |
accept(java.lang.String mediaType)
Getting media type setter.
|
static Setter |
accept(ContentType contentType)
Getting media type setter.
|
static Setter |
basicAuth(java.lang.String userName,
java.lang.String password)
Use http basic authentication.
|
static Setter |
body(java.lang.String body)
Getting requestSpecification body setter.
|
static Setter |
body(java.io.Serializable body)
Getting requestSpecification body setter.
|
static Setter |
contentType(ContentType type)
Getting content type setter.
|
static Setter |
contentType(java.lang.String type)
Getting content type setter.
|
static Setter |
formParam(java.lang.String key,
java.lang.Object value)
Getting form param setter.
|
static Setter |
header(java.lang.String name,
java.lang.String value)
Getting header setter.
|
static Setter |
host(java.lang.String host)
Getting requestSpecification host setter.
|
static Setter |
multiPart(java.lang.String controlName,
java.lang.String fileName,
java.io.InputStream stream)
Getting multi part setter.
|
static Setter |
multiPart(java.lang.String controlName,
java.lang.String fileName,
java.io.InputStream stream,
java.lang.String mimeType)
Getting multi part setter.
|
static Setter |
multiPart(java.io.File file)
Getting multi part setter.
|
static Setter |
multiPart(java.lang.String controlName,
java.io.File file)
Getting multi part setter.
|
static Setter |
multiPart(io.restassured.specification.MultiPartSpecification multiPartSpecification)
Getting multi part setter.
|
static Setter |
noAuth()
Clear all authentication settings.
|
static Setter |
param(java.lang.String key,
java.lang.Object value)
Getting param setter.
|
static Setter |
path(java.lang.String path)
Getting requestSpecification path setter.
|
static Setter |
pathParam(java.lang.String key,
java.lang.Object value)
Getting path param setter.
|
static Setter |
port(int port)
Getting requestSpecification port setter.
|
static Setter |
protocol(java.lang.String protocol)
Getting requestSpecification protocol setter.
|
static Setter |
queryParam(java.lang.String key,
java.lang.Object value)
Getting query param setter.
|
static Setter |
redirects(int max)
Getting redirect setter.
|
static Setter |
redirects(boolean follow)
Getting redirect setter.
|
static Setter |
urlEncodingEnabled(boolean isEnabled)
Specifies if RestTest should url encode the URL automatically. Usually this is a 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 static Setters.Companion Companion
public Setters()
Abstract class for using static functions to call setters.
public static Setter contentType(ContentType type)
Getting content type setter.
type - of content.public static Setter contentType(java.lang.String type)
Getting content type setter.
type - of content.public static Setter param(java.lang.String key, java.lang.Object value)
Getting param setter.
key - of param.value - of param.public static Setter queryParam(java.lang.String key, java.lang.Object value)
Getting query param setter.
key - of query param.value - of query param.public static Setter formParam(java.lang.String key, java.lang.Object value)
Getting form param setter.
key - of form param.value - of form param.public static Setter header(java.lang.String name, java.lang.String value)
Getting header setter.
name - of header.value - of header.public static Setter body(java.lang.String body)
Getting requestSpecification body setter.
body - of requestSpecification.public static Setter body(java.io.Serializable body)
Getting requestSpecification body setter.
body - of requestSpecification.public static Setter protocol(java.lang.String protocol)
Getting requestSpecification protocol setter.
protocol - of requestSpecification.public static Setter host(java.lang.String host)
Getting requestSpecification host setter.
host - of requestSpecification.public static Setter path(java.lang.String path)
Getting requestSpecification path setter.
path - of requestSpecification.public static Setter port(int port)
Getting requestSpecification port setter.
port - of requestSpecification.public static Setter pathParam(java.lang.String key, java.lang.Object value)
Getting path param setter.
key - of path param.value - of path param.public static Setter multiPart(java.lang.String controlName, java.lang.String fileName, java.io.InputStream stream)
Getting multi part setter.
controlName - of the body part. In HTML this is the attribute name of the input tag.fileName - of the content you're uploading.stream - you want to requestSpecification.public static Setter multiPart(java.lang.String controlName, java.lang.String fileName, java.io.InputStream stream, java.lang.String mimeType)
Getting multi part setter.
controlName - of the body part. In HTML this is the attribute name of the input tag.fileName - of the content you're uploading.stream - you want to requestSpecification.mimeType - The mime-typepublic static Setter multiPart(java.io.File file)
Getting multi part setter.
file - to uploadpublic static Setter multiPart(java.lang.String controlName, java.io.File file)
Getting multi part setter.
file - to uploadcontrolName - Defines the control name of the body part. In HTML this is the attribute name of the input tag.public static Setter multiPart(io.restassured.specification.MultiPartSpecification multiPartSpecification)
Getting multi part setter.
multiPartSpecification - of yur request.public static Setter redirects(int max)
Getting redirect setter.
max - count of redirects.public static Setter redirects(boolean follow)
Getting redirect setter.
follow - redirects.public static Setter accept(java.lang.String mediaType)
Getting media type setter.
mediaType - of request.public static Setter accept(ContentType contentType)
Getting media type setter.
contentType - of request.public static Setter urlEncodingEnabled(boolean isEnabled)
Specifies if RestTest should url encode the URL automatically. Usually this is a 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 - URL encoding or disabled.public static Setter basicAuth(java.lang.String userName, java.lang.String password)
Use http basic authentication.
userName - of your account.password - of your account.public static Setter noAuth()
Clear all authentication settings.