Class WebTestClientRequestSpecificationImpl
java.lang.Object
io.restassured.module.webtestclient.internal.WebTestClientRequestSpecificationImpl
- All Implemented Interfaces:
WebTestClientRequestSender,WebTestClientRequestSpecification,io.restassured.specification.RequestSenderOptions<WebTestClientResponse>
public class WebTestClientRequestSpecificationImpl
extends Object
implements WebTestClientRequestSpecification
-
Constructor Summary
ConstructorsConstructorDescriptionWebTestClientRequestSpecificationImpl(WebTestClientFactory webTestClientFactory, RestAssuredWebTestClientConfig config, String basePath, WebTestClientRequestSpecification requestSpecification, io.restassured.specification.ResponseSpecification responseSpecification) -
Method Summary
Modifier and TypeMethodDescriptionaccept(io.restassured.http.ContentType contentType) Specify the accept header of the request.Specify the accept header of the request.accept(org.springframework.http.MediaType... mediaTypes) Specify the accept header of the request.and()Syntactic sugarapplicationContextSetup(org.springframework.context.ApplicationContext context, org.springframework.test.web.reactive.server.WebTestClientConfigurer... configurers) Specify a single-value request attributeattributes(Map<String, ?> attributesMap) Specify request attributes as a mapbody(byte[] body) Specify a byte array request body that'll be sent with the request.Specify file content that'll be sent with the request.Specify an Object request content that will automatically be serialized to JSON or XML and sent with the request.Specify an Object request content that will automatically be serialized to JSON or XML and sent with the request using a specific object mapper.Specify an Object request content that will automatically be serialized to JSON or XML and sent with the request using a specific object mapper type.Specify a String request body (such as e.g.config(SpecificationConfig config) config(RestAssuredWebTestClientConfig config) Define a REST Assured WebTestClient configuration.consumeWith(Consumer<org.springframework.test.web.reactive.server.EntityExchangeResult<byte[]>> consumer) Specify aConsumerto process the request result.contentType(io.restassured.http.ContentType contentType) Specify the content type of the request.contentType(String contentType) Specify the content type of the request.contentType(org.springframework.http.MediaType mediaType) Specify the content type of the request.cookie(io.restassured.http.Cookie cookie) Specify aCookieto send with the request.Specify a cookie that'll be sent with the request e.g:cookies(io.restassured.http.Cookies cookies) Specify the cookies that'll be sent with the request asCookies:Specify the cookies that'll be sent with the request.Specify the cookies that'll be sent with the request as Map e.g:delete()* Perform a DELETE request to a uri obtained from a {@link Function<>} that usesUriBuilderto generateURI.Specify a form parameter that'll be sent with the request.formParam(String parameterName, Collection<?> parameterValues) Specify a multi-value form parameter that'll be sent with the request e.g:formParams(String firstParameterName, Object firstParameterValue, Object... parameterNameValuePairs) Specify the form parameters that'll be sent with the request.formParams(Map<String, ?> parametersMap) Specify the form parameters that'll be sent with the request.get()Perform a GET request to a uri obtained from a {@link Function<>} that usesUriBuilderto generateURI.io.restassured.http.Cookiesio.restassured.internal.log.LogRepositoryList<io.restassured.internal.multipart.MultiPartInternal>io.restassured.http.Headersio.restassured.filter.log.RequestLoggingFilterio.restassured.config.RestAssuredConfighead()* Perform a HEAD request to a uri obtained from a {@link Function<>} that usesUriBuilderto generateURI.header(io.restassured.http.Header header) Specify aHeaderto send with the request.Specify a header that'll be sent with the request e.g:headers(io.restassured.http.Headers headers) Specify the headers that'll be sent with the request asHeaders, e.g:Specify the headers that'll be sent with the request.Specify the headers that'll be sent with the request as Map e.g:log()Returns theWebTestClientRequestLogSpecificationthat allows you to log different parts of theWebTestClientRequestSpecification.Specify a file to upload to the server using multi-part form data uploading.Specify a file to upload to the server using multi-part form data uploading with a specific control name.Specify a file to upload to the server using multi-part form data uploading with a specific control name and mime-type.Specify an object that will be serialized to JSON and uploaded to the server using multi-part form data uploading with a specific control name.Specify an object that will be serialized and uploaded to the server using multi-part form data uploading with a specific control name.Specify a string to send to the server using multi-part form data.Specify a byte-array to upload to the server using multi-part form data.Specify a byte-array to upload to the server using multi-part form data.multiPart(String controlName, String fileName, InputStream stream) Specify an inputstream to upload to the server using multi-part form data.multiPart(String controlName, String fileName, InputStream stream, String mimeType) Specify an inputstream to upload to the server using multi-part form data.Specify an object that will be serialized and uploaded to the server using multi-part form data uploading with a specific control name.Specify a string to send to the server using multi-part form data with a specific mime-type.options()* Perform a OPTIONS request to a uri obtained from a {@link Function<>} that usesUriBuilderto generateURI.Specify a parameter that'll be sent with the request e.g:param(String parameterName, Collection<?> parameterValues) Specify a multi-value parameter that'll be sent with the request e.g:Specify the parameters that'll be sent with the request.Specify the parameters that'll be sent with the request as Map e.g:patch()* Perform a PATCH request to a uri obtained from a {@link Function<>} that usesUriBuilderto generateURI.Specify a path parameter.pathParams(String firstParameterName, Object firstParameterValue, Object... parameterNameValuePairs) Specify the path parameters that'll be sent with the request.pathParams(Map<String, Object> parametersMap) Specify the path parameters that'll be sent with the request.post()Perform a POST request to a uri obtained from a {@link Function<>} that usesUriBuilderto generateURI.put()* Perform a PUT request to a uri obtained from a {@link Function<>} that usesUriBuilderto generateURI.queryParam(String parameterName, Object... parameterValues) Specify a query parameter that'll be sent with the request.queryParam(String parameterName, Collection<?> parameterValues) Specify a multi-value query parameter that'll be sent with the request e.g:queryParams(String firstParameterName, Object firstParameterValue, Object... parameterNameValuePairs) Specify the query parameters that'll be sent with the request.queryParams(Map<String, ?> parametersMap) Specify the query parameters that'll be sent with the request.request(io.restassured.http.Method method) request(io.restassured.http.Method method, Function<org.springframework.web.util.UriBuilder, URI> uriFunction) * Perform a request to a uri obtained from a {@link Function<>} that usesUriBuilderto generateURI.* Perform a request to a uri obtained from a {@link Function<>} that usesUriBuilderto generateURI.Set the session id for this request.Set the session id name and value for this request.voidsetRequestLoggingFilter(io.restassured.filter.log.RequestLoggingFilter requestLoggingFilter) spec(WebTestClientRequestSpecification requestSpecificationToMerge) Add request data from a pre-defined specification.standaloneSetup(Object... controllerOrWebTestClientConfigurer) Build aWebTestClientby registering one or more@Controller's instances and configuring Spring infrastructure programmatically.standaloneSetup(org.springframework.test.web.reactive.server.WebTestClient.Builder builder) Build aWebTestClientby using a providedAbstractWebTestClientBuilderfor configuring Spring infrastructure programmatically.standaloneSetup(org.springframework.web.reactive.function.server.RouterFunction routerFunction, org.springframework.test.web.reactive.server.WebTestClientConfigurer... configurers) webAppContextSetup(org.springframework.web.context.WebApplicationContext context, org.springframework.test.web.reactive.server.WebTestClientConfigurer... configurers) Build aWebTestClientusing the given, fully initialized, i.e.webTestClient(org.springframework.test.web.reactive.server.WebTestClient webTestClient) Provide aWebTestClientinstance to that REST Assured will use when making this request.when()Call this method when you're done setting up the request specification.
-
Constructor Details
-
WebTestClientRequestSpecificationImpl
public WebTestClientRequestSpecificationImpl(WebTestClientFactory webTestClientFactory, RestAssuredWebTestClientConfig config, String basePath, WebTestClientRequestSpecification requestSpecification, io.restassured.specification.ResponseSpecification responseSpecification)
-
-
Method Details
-
contentType
Description copied from interface:WebTestClientRequestSpecificationSpecify the content type of the request.- Specified by:
contentTypein interfaceWebTestClientRequestSpecification- Parameters:
contentType- The content type of the request- Returns:
- The request specification
- See Also:
-
ContentType
-
contentType
Description copied from interface:WebTestClientRequestSpecificationSpecify the content type of the request.- Specified by:
contentTypein interfaceWebTestClientRequestSpecification- Parameters:
mediaType- The content type of the request- Returns:
- The request specification
- See Also:
-
ContentType
-
contentType
Description copied from interface:WebTestClientRequestSpecificationSpecify the content type of the request.- Specified by:
contentTypein interfaceWebTestClientRequestSpecification- Parameters:
contentType- The content type of the request- Returns:
- The request specification
- See Also:
-
ContentType
-
accept
Description copied from interface:WebTestClientRequestSpecificationSpecify the accept header of the request. This just a shortcut for:header("Accept", contentType);- Specified by:
acceptin interfaceWebTestClientRequestSpecification- Parameters:
contentType- The content type whose accept headerContentType.getAcceptHeader()will be used as Accept header in the request.- Returns:
- The request specification
- See Also:
-
accept
Description copied from interface:WebTestClientRequestSpecificationSpecify the accept header of the request. This just a shortcut for:header("Accept", contentType);- Specified by:
acceptin interfaceWebTestClientRequestSpecification- Parameters:
mediaTypes- The media type(s) that will be used as Accept header in the request.- Returns:
- The request specification
- See Also:
-
accept
Description copied from interface:WebTestClientRequestSpecificationSpecify the accept header of the request. This just a shortcut for:header("Accept", contentType);- Specified by:
acceptin interfaceWebTestClientRequestSpecification- Parameters:
mediaTypes- The media type(s) that will be used as Accept header in the request.- Returns:
- The request specification
- See Also:
-
headers
public WebTestClientRequestSpecification headers(String firstHeaderName, Object firstHeaderValue, Object... headerNameValuePairs) Description copied from interface:WebTestClientRequestSpecificationSpecify the headers that'll be sent with the request. This is done by specifying the headers in name-value pairs, e.g:given().headers("headerName1", "headerValue1", "headerName2", "headerValue2").then().expect().body(equalTo("something")).when().get("/headers");This will send a GET request to "/headers" with two headers:- headerName1=headerValue1
- headerName2=headerValue2
- Specified by:
headersin interfaceWebTestClientRequestSpecification- Parameters:
firstHeaderName- The name of the first headerfirstHeaderValue- The value of the first headerheaderNameValuePairs- Additional headers in name-value pairs.- Returns:
- The request specification
-
headers
Description copied from interface:WebTestClientRequestSpecificationSpecify the headers that'll be sent with the request as Map e.g:Map<String, String> headers = new HashMap<String, String>(); parameters.put("headerName1", "headerValue1"); parameters.put("headerName2", "headerValue2"); given().headers(headers).then().expect().body(equalTo("something")).when().get("/headers");This will send a GET request to "/headers" with two headers:- headerName1=headerValue1
- headerName2=headerValue2
- Specified by:
headersin interfaceWebTestClientRequestSpecification- Parameters:
headers- The Map containing the header names and their values to send with the request.- Returns:
- The request specification
-
headers
Description copied from interface:WebTestClientRequestSpecificationSpecify the headers that'll be sent with the request asHeaders, e.g:Header first = new Header("headerName1", "headerValue1"); Header second = new Header("headerName2", "headerValue2"); Headers headers = new Header(first, second); given().headers(headers).then().expect().body(equalTo("something")).when().get("/headers");This will send a GET request to "/headers" with two headers:- headerName1=headerValue1
- headerName2=headerValue2
- Specified by:
headersin interfaceWebTestClientRequestSpecification- Parameters:
headers- The headers to use in the request- Returns:
- The request specification
-
header
public WebTestClientRequestSpecification header(String headerName, Object headerValue, Object... additionalHeaderValues) Description copied from interface:WebTestClientRequestSpecificationSpecify a header that'll be sent with the request e.g:given().header("username", "John").and().expect().body(equalTo("something")).when().get("/header");This will set the headerusername=Johnin the GET request to "/header".You can also specify several headers like this:
given().header("username", "John").and().header("zipCode", "12345").and().expect().body(equalTo("something")).when().get("/header");If you specifyadditionalHeaderValuesthen the Header will be a multi-value header. This means that you'll create several headers with the same name but with different values.- Specified by:
headerin interfaceWebTestClientRequestSpecification- Parameters:
headerName- The header nameheaderValue- The header valueadditionalHeaderValues- Additional header values. This will actually create two headers with the same name but with different values.- Returns:
- The request specification
- See Also:
-
header
Description copied from interface:WebTestClientRequestSpecificationSpecify aHeaderto send with the request.Header someHeader = new Header("some_name", "some_value"); given().header(someHeader).and().expect().body(equalTo("x")).when().get("/header");This will set the headersome_name=some_valuein the GET request to "/header".- Specified by:
headerin interfaceWebTestClientRequestSpecification- Parameters:
header- The header to add to the request- Returns:
- The request specification
- See Also:
-
log
Description copied from interface:WebTestClientRequestSpecificationReturns theWebTestClientRequestLogSpecificationthat allows you to log different parts of theWebTestClientRequestSpecification. This is mainly useful for debug purposes when writing your tests.- Specified by:
login interfaceWebTestClientRequestSpecification- Returns:
- the request log specification
-
params
public WebTestClientRequestSpecification params(String firstParameterName, Object firstParameterValue, Object... parameterNameValuePairs) Description copied from interface:WebTestClientRequestSpecificationSpecify the parameters that'll be sent with the request. This is done by specifying the parameters in name-value pairs, e.g:given().params("username", "John", "token", "1234").when().get("/parameters").then().assertThat().body(equalTo("username, token"));This will send a GET request to "/parameters" with two parameters:- username=John
- token=1234
- Specified by:
paramsin interfaceWebTestClientRequestSpecification- Parameters:
firstParameterName- The name of the first parameterfirstParameterValue- The value of the first parameterparameterNameValuePairs- Additional parameters in name-value pairs.- Returns:
- The request specification
-
params
Description copied from interface:WebTestClientRequestSpecificationSpecify the parameters that'll be sent with the request as Map e.g:Map<String, String> parameters = new HashMap<String, String>(); parameters.put("username", "John"); parameters.put("token", "1234"); given().params(parameters).when().get("/cookie").then().assertThat().body(equalTo("username, token")).;This will send a GET request to "/cookie" with two parameters:- username=John
- token=1234
- Specified by:
paramsin interfaceWebTestClientRequestSpecification- Parameters:
parametersMap- The Map containing the parameter names and their values to send with the request.- Returns:
- The request specification
-
param
Description copied from interface:WebTestClientRequestSpecificationSpecify a parameter that'll be sent with the request e.g:given().parameter("username", "John").and().expect().body(equalTo("username")).when().get("/cookie");This will set the parameterusername=Johnin the GET request to "/cookie".You can also specify several parameters like this:
given().param("username", "John").and().param("password", "1234").when().get("/cookie").then().assertThat().body(equalTo("username")).;- Specified by:
paramin interfaceWebTestClientRequestSpecification- Parameters:
parameterName- The parameter nameparameterValues- Zero to many parameter values for this parameter name- Returns:
- The request specification
- See Also:
-
param
Description copied from interface:WebTestClientRequestSpecificationSpecify a multi-value parameter that'll be sent with the request e.g:given().param("cars", asList("Volvo", "Saab"))..;This will set the parametercars=Volvoandcars=Saab.- Specified by:
paramin interfaceWebTestClientRequestSpecification- Parameters:
parameterName- The parameter nameparameterValues- The parameter values- Returns:
- The request specification
-
queryParams
public WebTestClientRequestSpecification queryParams(String firstParameterName, Object firstParameterValue, Object... parameterNameValuePairs) Description copied from interface:WebTestClientRequestSpecificationSpecify the query parameters that'll be sent with the request. Note that this method is the same asWebTestClientRequestSpecification.params(String, Object, Object...)for all http methods except for POST whereWebTestClientRequestSpecification.params(String, Object, Object...)sets the form parameters and this method sets the query parameters.- Specified by:
queryParamsin interfaceWebTestClientRequestSpecification- Parameters:
firstParameterName- The name of the first parameterfirstParameterValue- The value of the first parameterparameterNameValuePairs- The value of the first parameter followed by additional parameters in name-value pairs.- Returns:
- The request specification
-
queryParams
Description copied from interface:WebTestClientRequestSpecificationSpecify the query parameters that'll be sent with the request. Note that this method is the same asWebTestClientRequestSpecification.params(Map)for all http methods except for POST whereWebTestClientRequestSpecification.params(Map)sets the form parameters and this method sets the query parameters.- Specified by:
queryParamsin interfaceWebTestClientRequestSpecification- Parameters:
parametersMap- The Map containing the parameter names and their values to send with the request.- Returns:
- The request specification
-
queryParam
public WebTestClientRequestSpecification queryParam(String parameterName, Object... parameterValues) Description copied from interface:WebTestClientRequestSpecificationSpecify a query parameter that'll be sent with the request. Note that this method is the same asWebTestClientRequestSpecification.param(String, Object...)for all http methods except for POST whereWebTestClientRequestSpecification.param(String, Object...)adds a form parameter and this method sets a query parameter.- Specified by:
queryParamin interfaceWebTestClientRequestSpecification- Parameters:
parameterName- The parameter nameparameterValues- Zero to many parameter values, i.e. you can specify multiple values for the same parameter- Returns:
- The request specification
- See Also:
-
queryParam
public WebTestClientRequestSpecification queryParam(String parameterName, Collection<?> parameterValues) Description copied from interface:WebTestClientRequestSpecificationSpecify a multi-value query parameter that'll be sent with the request e.g:given().queryParam("cars", asList("Volvo", "Saab"))..;This will set the parametercars=Volvoandcars=Saab. Note that this method is the same asWebTestClientRequestSpecification.param(String, java.util.Collection)for all http methods except for POST whereWebTestClientRequestSpecification.param(String, java.util.Collection)adds a form parameter and this method sets a query parameter.- Specified by:
queryParamin interfaceWebTestClientRequestSpecification- Parameters:
parameterName- The parameter nameparameterValues- The parameter values- Returns:
- The request specification
-
pathParams
public WebTestClientRequestSpecification pathParams(String firstParameterName, Object firstParameterValue, Object... parameterNameValuePairs) Description copied from interface:WebTestClientRequestSpecificationSpecify the path parameters that'll be sent with the request.- Specified by:
pathParamsin interfaceWebTestClientRequestSpecification- Parameters:
firstParameterName- The name of the first parameterfirstParameterValue- The value of the first parameterparameterNameValuePairs- The value of the first parameter followed by additional parameters in name-value pairs.- Returns:
- The request specification
-
pathParams
Description copied from interface:WebTestClientRequestSpecificationSpecify the path parameters that'll be sent with the request.- Specified by:
pathParamsin interfaceWebTestClientRequestSpecification- Parameters:
parametersMap- The Map containing the parameter names and their values to send with the request.- Returns:
- The request specification
-
pathParam
Description copied from interface:WebTestClientRequestSpecificationSpecify a path parameter. Path parameters are used to improve readability of the request path. E.g. instead of writing:when(). get("/item/"+myItem.getItemNumber()+"/buy/"+2). then(). statusCode(200);you can write:given(). pathParam("itemNumber", myItem.getItemNumber()). pathParam("amount", 2). when(). get("/item/{itemNumber}/buy/{amount}"). then(). statusCode(200);which improves readability and allows the path to be reusable in many tests. Another alternative is to use:when().get("/item/{itemNumber}/buy/{amount}", myItem.getItemNumber(), 2).then().statusCode(200).;- Specified by:
pathParamin interfaceWebTestClientRequestSpecification- Parameters:
parameterName- The parameter nameparameterValue- The parameter value- Returns:
- The request specification
-
formParams
public WebTestClientRequestSpecification formParams(String firstParameterName, Object firstParameterValue, Object... parameterNameValuePairs) Description copied from interface:WebTestClientRequestSpecificationSpecify the form parameters that'll be sent with the request. Note that this method is the same asWebTestClientRequestSpecification.params(String, Object, Object...)for all http methods except for POST whereWebTestClientRequestSpecification.params(String, Object, Object...)sets the form parameters and this method sets the form parameters.- Specified by:
formParamsin interfaceWebTestClientRequestSpecification- Parameters:
firstParameterName- The name of the first parameterfirstParameterValue- The value of the first parameterparameterNameValuePairs- The value of the first parameter followed by additional parameters in name-value pairs.- Returns:
- The request specification
-
formParams
Description copied from interface:WebTestClientRequestSpecificationSpecify the form parameters that'll be sent with the request. Note that this method is the same asWebTestClientRequestSpecification.params(Map)for all http methods except for POST whereWebTestClientRequestSpecification.params(Map)sets the form parameters and this method sets the form parameters.- Specified by:
formParamsin interfaceWebTestClientRequestSpecification- Parameters:
parametersMap- The Map containing the parameter names and their values to send with the request.- Returns:
- The request specification
-
formParam
Description copied from interface:WebTestClientRequestSpecificationSpecify a form parameter that'll be sent with the request. Note that this method is the same asWebTestClientRequestSpecification.param(String, Object...)for all http methods except for POST whereWebTestClientRequestSpecification.param(String, Object...)adds a form parameter and this method sets a form parameter.- Specified by:
formParamin interfaceWebTestClientRequestSpecification- Parameters:
parameterName- The parameter nameparameterValues- Zero to many parameter values, i.e. you can specify multiple values for the same parameter- Returns:
- The request specification
- See Also:
-
formParam
public WebTestClientRequestSpecification formParam(String parameterName, Collection<?> parameterValues) Description copied from interface:WebTestClientRequestSpecificationSpecify a multi-value form parameter that'll be sent with the request e.g:given().formParam("cars", asList("Volvo", "Saab"))..;This will set the parametercars=Volvoandcars=Saab. Note that this method is the same asWebTestClientRequestSpecification.param(String, java.util.Collection)for all http methods except for POST whereWebTestClientRequestSpecification.param(String, java.util.Collection)adds a form parameter and this method sets a form parameter.- Specified by:
formParamin interfaceWebTestClientRequestSpecification- Parameters:
parameterName- The parameter nameparameterValues- The parameter values- Returns:
- The request specification
-
attribute
Description copied from interface:WebTestClientRequestSpecificationSpecify a single-value request attribute- Specified by:
attributein interfaceWebTestClientRequestSpecification- Parameters:
attributeName- The attribute nameattributeValue- The attribute value- Returns:
- WebTestClientRequestSpecification with updated attributes Note: This will set attributes on `ClientRequest` in `WebTestClient`; given the way `WebTesClient` works under the hood, these arguments remain on client side only and will not be propagated to the `ServerRequest`.
-
attributes
Description copied from interface:WebTestClientRequestSpecificationSpecify request attributes as a map- Specified by:
attributesin interfaceWebTestClientRequestSpecification- Parameters:
attributesMap- The Map containing the request attribute names and their values- Returns:
- WebTestClientRequestSpecification with updated attributes Note: This will set attributes on `ClientRequest` in `WebTestClient`; given the way `WebTesClient` works under the hood, these arguments remain on client side only and will not be propagated to the `ServerRequest`.
-
body
Description copied from interface:WebTestClientRequestSpecificationSpecify a String request body (such as e.g. JSON or XML) that'll be sent with the request. This works for the POST and PUT methods only. Trying to do this for the other http methods will cause an exception to be thrown.Example of use:
given().body("{ \"message\" : \"hello world\"}").then().expect().body(equalTo("hello world")).when().post("/json");This will POST a request containing JSON to "/json" and expect that the response body equals to "hello world".- Specified by:
bodyin interfaceWebTestClientRequestSpecification- Parameters:
body- The body to send.- Returns:
- The request specification
-
body
Description copied from interface:WebTestClientRequestSpecificationSpecify a byte array request body that'll be sent with the request. This only works for the POST http method. Trying to do this for the other http methods will cause an exception to be thrown.Example of use:
byte[] someBytes = .. given().body(someBytes).then().expect().body(equalTo("hello world")).when().post("/json");This will POST a request containingsomeBytesto "/json" and expect that the response body equals to "hello world".- Specified by:
bodyin interfaceWebTestClientRequestSpecification- Parameters:
body- The body to send.- Returns:
- The request specification
-
body
Description copied from interface:WebTestClientRequestSpecificationSpecify file content that'll be sent with the request. This only works for the POST, PATCH and PUT http method. Trying to do this for the other http methods will cause an exception to be thrown.Example of use:
File myFile = .. given().content(myFile).when().post("/json").then().content(equalTo("hello world"));This will POST a request containingmyFileto "/json" and expect that the response content equals to "hello world".- Specified by:
bodyin interfaceWebTestClientRequestSpecification- Parameters:
body- The content to send.- Returns:
- The request specification
-
body
Description copied from interface:WebTestClientRequestSpecificationSpecify an Object request content that will automatically be serialized to JSON or XML and sent with the request. If the object is a primitive or Number the object will be converted to a String and put in the request body. This works for the POST and PUT methods only. Trying to do this for the other http methods will cause an exception to be thrown.Example of use:
Message message = new Message(); message.setMessage("My beautiful message"); given(). contentType("application/json"). body(message). expect(). content(equalTo("Response to a beautiful message")). when(). post("/beautiful-message");Since the content-type is "application/json" then REST Assured will automatically try to serialize the object using Jackson or Gson if they are available in the classpath. If any of these frameworks are not in the classpath then an exception is thrown.
If the content-type is "application/xml" then REST Assured will automatically try to serialize the object using JAXB if it's available in the classpath. Otherwise an exception will be thrown.
If no request content-type is specified then REST Assured determine the parser in the following order:- Jackson
- Gson
- JAXB
- Specified by:
bodyin interfaceWebTestClientRequestSpecification- Parameters:
object- The object to serialize and send with the request- Returns:
- The request specification
-
body
public WebTestClientRequestSpecification body(Object object, io.restassured.mapper.ObjectMapper mapper) Description copied from interface:WebTestClientRequestSpecificationSpecify an Object request content that will automatically be serialized to JSON or XML and sent with the request using a specific object mapper. This works for the POST, PATCH and PUT methods only. Trying to do this for the other http methods will cause an exception to be thrown. Example of use:Message message = new Message(); message.setMessage("My beautiful message"); given(). body(message, new MyObjectMapper()). expect(). content(equalTo("Response to a beautiful message")). when(). post("/beautiful-message");- Specified by:
bodyin interfaceWebTestClientRequestSpecification- Parameters:
object- The object to serialize and send with the requestmapper- The object mapper- Returns:
- The request specification
-
body
public WebTestClientRequestSpecification body(Object object, io.restassured.mapper.ObjectMapperType mapperType) Description copied from interface:WebTestClientRequestSpecificationSpecify an Object request content that will automatically be serialized to JSON or XML and sent with the request using a specific object mapper type. This works for the POST, PATCH and PUT methods only. Trying to do this for the other http methods will cause an exception to be thrown. Example of use:Message message = new Message(); message.setMessage("My beautiful message"); given(). body(message, ObjectMapper.GSON). expect(). content(equalTo("Response to a beautiful message")). when(). post("/beautiful-message");- Specified by:
bodyin interfaceWebTestClientRequestSpecification- Parameters:
object- The object to serialize and send with the requestmapperType- The object mapper type to be used- Returns:
- The request specification
-
cookies
public WebTestClientRequestSpecification cookies(String firstCookieName, Object firstCookieValue, Object... cookieNameValuePairs) Description copied from interface:WebTestClientRequestSpecificationSpecify the cookies that'll be sent with the request. This is done by specifying the cookies in name-value pairs, e.g:given().cookies("username", "John", "token", "1234").then().expect().body(equalTo("username, token")).when().get("/cookie");This will send a GET request to "/cookie" with two cookies:- username=John
- token=1234
- Specified by:
cookiesin interfaceWebTestClientRequestSpecification- Parameters:
firstCookieName- The name of the first cookiefirstCookieValue- The value of the first cookiecookieNameValuePairs- Additional cookies in name-value pairs.- Returns:
- The request specification
-
cookies
Description copied from interface:WebTestClientRequestSpecificationSpecify the cookies that'll be sent with the request as Map e.g:Map<String, String> cookies = new HashMap<String, String>(); cookies.put("username", "John"); cookies.put("token", "1234"); given().cookies(cookies).then().expect().body(equalTo("username, token")).when().get("/cookie");This will send a GET request to "/cookie" with two cookies:- username=John
- token=1234
- Specified by:
cookiesin interfaceWebTestClientRequestSpecification- Parameters:
cookies- The Map containing the cookie names and their values to set in the request.- Returns:
- The request specification
-
cookies
Description copied from interface:WebTestClientRequestSpecificationSpecify the cookies that'll be sent with the request asCookies:Cookie cookie1 = Cookie.Builder("username", "John").setComment("comment 1").build(); Cookie cookie2 = Cookie.Builder("token", 1234).setComment("comment 2").build(); Cookies cookies = new Cookies(cookie1, cookie2); given().cookies(cookies).then().expect().body(equalTo("username, token")).when().get("/cookie");This will send a GET request to "/cookie" with two cookies:- username=John
- token=1234
- Specified by:
cookiesin interfaceWebTestClientRequestSpecification- Parameters:
cookies- The cookies to set in the request.- Returns:
- The request specification
-
cookie
public WebTestClientRequestSpecification cookie(String cookieName, Object cookieValue, Object... additionalValues) Description copied from interface:WebTestClientRequestSpecificationSpecify a cookie that'll be sent with the request e.g:given().cookie("username", "John").and().expect().body(equalTo("username")).when().get("/cookie");This will set the cookieusername=Johnin the GET request to "/cookie".You can also specify several cookies like this:
given().cookie("username", "John").and().cookie("password", "1234").and().expect().body(equalTo("username")).when().get("/cookie");If you specifyadditionalValuesthen the Cookie will be a multi-value cookie. This means that you'll create several cookies with the same name but with different values.- Specified by:
cookiein interfaceWebTestClientRequestSpecification- Parameters:
cookieName- The cookie cookieNamecookieValue- The cookie valueadditionalValues- Additional cookies values. This will actually create two cookies with the same name but with different values.- Returns:
- The request specification
- See Also:
-
cookie
Description copied from interface:WebTestClientRequestSpecificationSpecify aCookieto send with the request.Cookie someCookie = new Cookie.Builder("some_cookie", "some_value").setSecured(true).build(); given().cookie(someCookie).and().expect().body(equalTo("x")).when().get("/cookie");This will set the cookiesomeCookiein the GET request to "/cookie".- Specified by:
cookiein interfaceWebTestClientRequestSpecification- Parameters:
cookie- The cookie to add to the request- Returns:
- The request specification
- See Also:
-
multiPart
Description copied from interface:WebTestClientRequestSpecificationSpecify a file to upload to the server using multi-part form data uploading. It will assume that the control name is file and the mime-type is application/octet-stream. If this is not what you want please use an overloaded method.- Specified by:
multiPartin interfaceWebTestClientRequestSpecification- Parameters:
file- The file to upload- Returns:
- The request specification
-
multiPart
Description copied from interface:WebTestClientRequestSpecificationSpecify a file to upload to the server using multi-part form data uploading with a specific control name. It will use the mime-type application/octet-stream. If this is not what you want please use an overloaded method.- Specified by:
multiPartin interfaceWebTestClientRequestSpecification- Parameters:
controlName- Defines the control name of the body part. In HTML this is the attribute name of the input tag.file- The file to upload- Returns:
- The request specification
-
multiPart
Description copied from interface:WebTestClientRequestSpecificationSpecify a file to upload to the server using multi-part form data uploading with a specific control name and mime-type.- Specified by:
multiPartin interfaceWebTestClientRequestSpecification- Parameters:
controlName- Defines the control name of the body part. In HTML this is the attribute name of the input tag.file- The file to uploadmimeType- The mime-type- Returns:
- The request specification
-
multiPart
Description copied from interface:WebTestClientRequestSpecificationSpecify an object that will be serialized to JSON and uploaded to the server using multi-part form data uploading with a specific control name. It will use mime-type application/json. If this is not what you want please use an overloaded method.- Specified by:
multiPartin interfaceWebTestClientRequestSpecification- Parameters:
controlName- Defines the control name of the body part. In HTML this is the attribute name of the input tag.object- The object to serialize to JSON or XML and send to the server- Returns:
- The request specification
-
multiPart
public WebTestClientRequestSpecification multiPart(String controlName, Object object, String mimeType) Description copied from interface:WebTestClientRequestSpecificationSpecify an object that will be serialized and uploaded to the server using multi-part form data uploading with a specific control name.- Specified by:
multiPartin interfaceWebTestClientRequestSpecification- Parameters:
controlName- Defines the control name of the body part. In HTML this is the attribute name of the input tag.object- The object to serialize to JSON or XML and send to the servermimeType- The mime-type- Returns:
- The request specification
-
multiPart
public WebTestClientRequestSpecification multiPart(String controlName, String filename, Object object, String mimeType) Description copied from interface:WebTestClientRequestSpecificationSpecify an object that will be serialized and uploaded to the server using multi-part form data uploading with a specific control name.- Specified by:
multiPartin interfaceWebTestClientRequestSpecification- Parameters:
controlName- Defines the control name of the body part. In HTML this is the attribute name of the input tag.filename- The name of the content you're uploadingobject- The object to serialize to JSON or XML and send to the servermimeType- The mime-type- Returns:
- The request specification
-
multiPart
public WebTestClientRequestSpecification multiPart(String controlName, String fileName, byte[] bytes) Description copied from interface:WebTestClientRequestSpecificationSpecify a byte-array to upload to the server using multi-part form data. It will use the mime-type application/octet-stream. If this is not what you want please use an overloaded method.- Specified by:
multiPartin interfaceWebTestClientRequestSpecification- Parameters:
controlName- Defines the control name of the body part. In HTML this is the attribute name of the input tag.fileName- The name of the content you're uploadingbytes- The bytes you want to send- Returns:
- The request specification
-
multiPart
public WebTestClientRequestSpecification multiPart(String controlName, String fileName, byte[] bytes, String mimeType) Description copied from interface:WebTestClientRequestSpecificationSpecify a byte-array to upload to the server using multi-part form data.- Specified by:
multiPartin interfaceWebTestClientRequestSpecification- Parameters:
controlName- Defines the control name of the body part. In HTML this is the attribute name of the input tag.fileName- The name of the content you're uploadingbytes- The bytes you want to sendmimeType- The mime-type- Returns:
- The request specification
-
multiPart
public WebTestClientRequestSpecification multiPart(String controlName, String fileName, InputStream stream) Description copied from interface:WebTestClientRequestSpecificationSpecify an inputstream to upload to the server using multi-part form data. It will use the mime-type application/octet-stream. If this is not what you want please use an overloaded method.- Specified by:
multiPartin interfaceWebTestClientRequestSpecification- Parameters:
controlName- Defines the control name of the body part. In HTML this is the attribute name of the input tag.fileName- The name of the content you're uploadingstream- The stream you want to send- Returns:
- The request specification
-
multiPart
public WebTestClientRequestSpecification multiPart(String controlName, String fileName, InputStream stream, String mimeType) Description copied from interface:WebTestClientRequestSpecificationSpecify an inputstream to upload to the server using multi-part form data.- Specified by:
multiPartin interfaceWebTestClientRequestSpecification- Parameters:
controlName- Defines the control name of the body part. In HTML this is the attribute name of the input tag.fileName- The name of the content you're uploadingstream- The stream you want to sendmimeType- The mime-type- Returns:
- The request specification
-
multiPart
Description copied from interface:WebTestClientRequestSpecificationSpecify a string to send to the server using multi-part form data. It will use the mime-type text/plain. If this is not what you want please use an overloaded method.- Specified by:
multiPartin interfaceWebTestClientRequestSpecification- Parameters:
controlName- Defines the control name of the body part. In HTML this is the attribute name of the input tag.contentBody- The string to send- Returns:
- The request specification
-
multiPart
public WebTestClientRequestSpecification multiPart(String controlName, String contentBody, String mimeType) Description copied from interface:WebTestClientRequestSpecificationSpecify a string to send to the server using multi-part form data with a specific mime-type.- Specified by:
multiPartin interfaceWebTestClientRequestSpecification- Parameters:
controlName- Defines the control name of the body part. In HTML this is the attribute name of the input tag.contentBody- The string to sendmimeType- The mime-type- Returns:
- The request specification
-
config
Description copied from interface:WebTestClientRequestSpecificationDefine a REST Assured WebTestClient configuration. E.g.given().config(newConfig().logConfig(new LogConfig(captor, true))). ..
newConfig()can be statically imported fromRestAssuredWebTestClientConfig.- Specified by:
configin interfaceWebTestClientRequestSpecification- Parameters:
config- The configuration to use for this request. Ifnullno config will be used.- Returns:
- The request specification
-
config
- Specified by:
configin interfaceWebTestClientRequestSpecification
-
spec
public WebTestClientRequestSpecification spec(WebTestClientRequestSpecification requestSpecificationToMerge) Description copied from interface:WebTestClientRequestSpecificationAdd request data from a pre-defined specification. E.g.WebTestClientRequestSpecification requestSpec = new WebTestClientRequestSpecBuilder().addParam("parameter1", "value1").build(); given(). spec(requestSpec). param("parameter2", "value2"). when(). get("/something");This is useful when you want to reuse an entire specification across multiple requests. The specification passed to this method is merged with the current specification. Note that the supplied specification can overwrite data in the current specification. The following settings are overwritten:- Content type
- Request body
- Interceptions
- Log (if defined in
requestSpecificationToMerge) - Config
- Parameters
- Attributes
- Cookies
- Headers
- Specified by:
specin interfaceWebTestClientRequestSpecification- Parameters:
requestSpecificationToMerge- The specification to merge with.- Returns:
- the request specification
-
sessionId
Description copied from interface:WebTestClientRequestSpecificationSet the session id for this request. It will use the configured session id name from the configuration (by default this is ). You can configure the session id name by using:RestAssured.config = newConfig().sessionConfig(new SessionConfig().sessionIdName(<sessionIdName>));or you can use theWebTestClientRequestSpecification.sessionId(String, String)method to set it for this request only.- Specified by:
sessionIdin interfaceWebTestClientRequestSpecification- Parameters:
sessionIdValue- The session id value.- Returns:
- The request specification
-
sessionId
Description copied from interface:WebTestClientRequestSpecificationSet the session id name and value for this request. It'll override the default session id name from the configuration (by default this is ). You can configure the default session id name by using:RestAssured.config = newConfig().sessionConfig(new SessionConfig().sessionIdName(<sessionIdName>));and then you can use theWebTestClientRequestSpecification.sessionId(String)method to set the session id value without specifying the name for each request.- Specified by:
sessionIdin interfaceWebTestClientRequestSpecification- Parameters:
sessionIdName- The session id namesessionIdValue- The session id value.- Returns:
- The request specification
-
when
Description copied from interface:WebTestClientRequestSpecificationCall this method when you're done setting up the request specification.- Specified by:
whenin interfaceWebTestClientRequestSpecification- Returns:
- The
WebTestClientRequestSenderthat let's you send the request.
-
standaloneSetup
public WebTestClientRequestSpecification standaloneSetup(Object... controllerOrWebTestClientConfigurer) Description copied from interface:WebTestClientRequestSpecificationBuild aWebTestClientby registering one or more@Controller's instances and configuring Spring infrastructure programmatically. This allows full control over the instantiation and initialization of controllerOrWebTestClientConfigurer, and their dependencies, similar to plain unit tests while also making it possible to test one controller at a time.This uses the
WebTestClient.bindToController(Object...)method under the hood.- Specified by:
standaloneSetupin interfaceWebTestClientRequestSpecification- Parameters:
controllerOrWebTestClientConfigurer- one or more@Controller's to test or a combination of controllers andWebTestClientConfigurer
-
standaloneSetup
public WebTestClientRequestSpecification standaloneSetup(org.springframework.test.web.reactive.server.WebTestClient.Builder builder) Description copied from interface:WebTestClientRequestSpecificationBuild aWebTestClientby using a providedAbstractWebTestClientBuilderfor configuring Spring infrastructure programmatically. This allows full control over the instantiation and initialization of controllers, and their dependencies, similar to plain unit tests while also making it possible to test one controller at a time.This uses the
WebTestClient.Builderto set up the WebTestClient instance.- Specified by:
standaloneSetupin interfaceWebTestClientRequestSpecification- Parameters:
builder-WebTestClient.Builderto build the WebTestClient instance.
-
standaloneSetup
public WebTestClientRequestSpecification standaloneSetup(org.springframework.web.reactive.function.server.RouterFunction routerFunction, org.springframework.test.web.reactive.server.WebTestClientConfigurer... configurers) - Specified by:
standaloneSetupin interfaceWebTestClientRequestSpecification
-
webTestClient
public WebTestClientRequestSpecification webTestClient(org.springframework.test.web.reactive.server.WebTestClient webTestClient) Description copied from interface:WebTestClientRequestSpecificationProvide aWebTestClientinstance to that REST Assured will use when making this request.- Specified by:
webTestClientin interfaceWebTestClientRequestSpecification- Parameters:
webTestClient- WebTestClient instance to use.- Returns:
- The request specification
-
webAppContextSetup
public WebTestClientRequestSpecification webAppContextSetup(org.springframework.web.context.WebApplicationContext context, org.springframework.test.web.reactive.server.WebTestClientConfigurer... configurers) Description copied from interface:WebTestClientRequestSpecificationBuild aWebTestClientusing the given, fully initialized, i.e. refreshed,WebApplicationContextand assign it to REST Assured. This method has been kept for consistency, but, actually, it is only be used asApplicationContext. The effect of calling this method is same as forWebTestClientRequestSpecification.applicationContextSetup(ApplicationContext, WebTestClientConfigurer...)- Specified by:
webAppContextSetupin interfaceWebTestClientRequestSpecification- Parameters:
context- The web application context to useconfigurers-WebTestClientConfigurer's to be applied when creating aWebTestClientinstance of this WebApplicationContext (optional)
-
applicationContextSetup
public WebTestClientRequestSpecification applicationContextSetup(org.springframework.context.ApplicationContext context, org.springframework.test.web.reactive.server.WebTestClientConfigurer... configurers) - Specified by:
applicationContextSetupin interfaceWebTestClientRequestSpecification
-
and
Description copied from interface:WebTestClientRequestSpecificationSyntactic sugar- Specified by:
andin interfaceWebTestClientRequestSpecification- Returns:
- The same
WebTestClientRequestSpecificationinstance.
-
getRequestBody
-
getRequestContentType
-
get
Description copied from interface:WebTestClientRequestSenderPerform a GET request to a uri obtained from a {@link Function<>} that usesUriBuilderto generateURI.- Specified by:
getin interfaceWebTestClientRequestSender- Parameters:
uriFunction- The function that will be used for evaluating the URI.- Returns:
- The response of the request.
-
post
public WebTestClientResponse post(Function<org.springframework.web.util.UriBuilder, URI> uriFunction) Description copied from interface:WebTestClientRequestSenderPerform a POST request to a uri obtained from a {@link Function<>} that usesUriBuilderto generateURI.- Specified by:
postin interfaceWebTestClientRequestSender- Parameters:
uriFunction- The function that will be used for evaluating the URI.- Returns:
- The response of the request.
-
put
Description copied from interface:WebTestClientRequestSender* Perform a PUT request to a uri obtained from a {@link Function<>} that usesUriBuilderto generateURI.- Specified by:
putin interfaceWebTestClientRequestSender- Parameters:
uriFunction- The function that will be used for evaluating the URI.- Returns:
- The response of the request.
-
delete
public WebTestClientResponse delete(Function<org.springframework.web.util.UriBuilder, URI> uriFunction) Description copied from interface:WebTestClientRequestSender* Perform a DELETE request to a uri obtained from a {@link Function<>} that usesUriBuilderto generateURI.- Specified by:
deletein interfaceWebTestClientRequestSender- Parameters:
uriFunction- The function that will be used for evaluating the URI.- Returns:
- The response of the request.
-
patch
public WebTestClientResponse patch(Function<org.springframework.web.util.UriBuilder, URI> uriFunction) Description copied from interface:WebTestClientRequestSender* Perform a PATCH request to a uri obtained from a {@link Function<>} that usesUriBuilderto generateURI.- Specified by:
patchin interfaceWebTestClientRequestSender- Parameters:
uriFunction- The function that will be used for evaluating the URI.- Returns:
- The response of the request.
-
head
public WebTestClientResponse head(Function<org.springframework.web.util.UriBuilder, URI> uriFunction) Description copied from interface:WebTestClientRequestSender* Perform a HEAD request to a uri obtained from a {@link Function<>} that usesUriBuilderto generateURI.- Specified by:
headin interfaceWebTestClientRequestSender- Parameters:
uriFunction- The function that will be used for evaluating the URI.- Returns:
- The response of the request.
-
options
public WebTestClientResponse options(Function<org.springframework.web.util.UriBuilder, URI> uriFunction) Description copied from interface:WebTestClientRequestSender* Perform a OPTIONS request to a uri obtained from a {@link Function<>} that usesUriBuilderto generateURI.- Specified by:
optionsin interfaceWebTestClientRequestSender- Parameters:
uriFunction- The function that will be used for evaluating the URI.- Returns:
- The response of the request.
-
request
public WebTestClientResponse request(io.restassured.http.Method method, Function<org.springframework.web.util.UriBuilder, URI> uriFunction) Description copied from interface:WebTestClientRequestSender* Perform a request to a uri obtained from a {@link Function<>} that usesUriBuilderto generateURI.- Specified by:
requestin interfaceWebTestClientRequestSender- Parameters:
method- The HTTP method to use while sending the request expressed asMethoduriFunction- The function that will be used for evaluating the URI.- Returns:
- The response of the request.
-
request
public WebTestClientResponse request(String method, Function<org.springframework.web.util.UriBuilder, URI> uriFunction) Description copied from interface:WebTestClientRequestSender* Perform a request to a uri obtained from a {@link Function<>} that usesUriBuilderto generateURI.- Specified by:
requestin interfaceWebTestClientRequestSender- Parameters:
method- The HTTP method to use while sending the request expressed asStringuriFunction- The function that will be used for evaluating the URI.- Returns:
- The response of the request.
-
consumeWith
public WebTestClientRequestSender consumeWith(Consumer<org.springframework.test.web.reactive.server.EntityExchangeResult<byte[]>> consumer) Description copied from interface:WebTestClientRequestSenderSpecify aConsumerto process the request result. The consumer will be applied before processing the result into aWebTestClientResponseand before extracting the response body content as byte array, which closes the stream. This is very useful, for example for extracting Spring Rest Docs. Usage example:RestAssuredWebTestClient.given() .standaloneSetup(new GreetingController(), documentationConfiguration(restDocumentation)) .queryParam("name", "John") .when() .consumeWith(document("greeting", pathParameters( parameterWithName("path").description("The path to greeting")), responseFields( fieldWithPath("id").description("The ID of the greeting"), fieldWithPath("content").description("The content of the greeting")) )) .get("/{path}", "greeting")- Specified by:
consumeWithin interfaceWebTestClientRequestSender- Parameters:
consumer- to be applied on the exchange result.- Returns:
- a
WebTestClientRequestSenderinstance.
-
get
- Specified by:
getin interfaceio.restassured.specification.RequestSenderOptions<WebTestClientResponse>
-
get
- Specified by:
getin interfaceio.restassured.specification.RequestSenderOptions<WebTestClientResponse>
-
post
- Specified by:
postin interfaceio.restassured.specification.RequestSenderOptions<WebTestClientResponse>
-
post
- Specified by:
postin interfaceio.restassured.specification.RequestSenderOptions<WebTestClientResponse>
-
put
- Specified by:
putin interfaceio.restassured.specification.RequestSenderOptions<WebTestClientResponse>
-
put
- Specified by:
putin interfaceio.restassured.specification.RequestSenderOptions<WebTestClientResponse>
-
delete
- Specified by:
deletein interfaceio.restassured.specification.RequestSenderOptions<WebTestClientResponse>
-
delete
- Specified by:
deletein interfaceio.restassured.specification.RequestSenderOptions<WebTestClientResponse>
-
head
- Specified by:
headin interfaceio.restassured.specification.RequestSenderOptions<WebTestClientResponse>
-
head
- Specified by:
headin interfaceio.restassured.specification.RequestSenderOptions<WebTestClientResponse>
-
patch
- Specified by:
patchin interfaceio.restassured.specification.RequestSenderOptions<WebTestClientResponse>
-
patch
- Specified by:
patchin interfaceio.restassured.specification.RequestSenderOptions<WebTestClientResponse>
-
options
- Specified by:
optionsin interfaceio.restassured.specification.RequestSenderOptions<WebTestClientResponse>
-
options
- Specified by:
optionsin interfaceio.restassured.specification.RequestSenderOptions<WebTestClientResponse>
-
get
- Specified by:
getin interfaceio.restassured.specification.RequestSenderOptions<WebTestClientResponse>
-
post
- Specified by:
postin interfaceio.restassured.specification.RequestSenderOptions<WebTestClientResponse>
-
put
- Specified by:
putin interfaceio.restassured.specification.RequestSenderOptions<WebTestClientResponse>
-
delete
- Specified by:
deletein interfaceio.restassured.specification.RequestSenderOptions<WebTestClientResponse>
-
head
- Specified by:
headin interfaceio.restassured.specification.RequestSenderOptions<WebTestClientResponse>
-
patch
- Specified by:
patchin interfaceio.restassured.specification.RequestSenderOptions<WebTestClientResponse>
-
options
- Specified by:
optionsin interfaceio.restassured.specification.RequestSenderOptions<WebTestClientResponse>
-
get
- Specified by:
getin interfaceio.restassured.specification.RequestSenderOptions<WebTestClientResponse>
-
post
- Specified by:
postin interfaceio.restassured.specification.RequestSenderOptions<WebTestClientResponse>
-
put
- Specified by:
putin interfaceio.restassured.specification.RequestSenderOptions<WebTestClientResponse>
-
delete
- Specified by:
deletein interfaceio.restassured.specification.RequestSenderOptions<WebTestClientResponse>
-
head
- Specified by:
headin interfaceio.restassured.specification.RequestSenderOptions<WebTestClientResponse>
-
patch
- Specified by:
patchin interfaceio.restassured.specification.RequestSenderOptions<WebTestClientResponse>
-
options
- Specified by:
optionsin interfaceio.restassured.specification.RequestSenderOptions<WebTestClientResponse>
-
get
- Specified by:
getin interfaceio.restassured.specification.RequestSenderOptions<WebTestClientResponse>
-
post
- Specified by:
postin interfaceio.restassured.specification.RequestSenderOptions<WebTestClientResponse>
-
put
- Specified by:
putin interfaceio.restassured.specification.RequestSenderOptions<WebTestClientResponse>
-
delete
- Specified by:
deletein interfaceio.restassured.specification.RequestSenderOptions<WebTestClientResponse>
-
head
- Specified by:
headin interfaceio.restassured.specification.RequestSenderOptions<WebTestClientResponse>
-
patch
- Specified by:
patchin interfaceio.restassured.specification.RequestSenderOptions<WebTestClientResponse>
-
options
- Specified by:
optionsin interfaceio.restassured.specification.RequestSenderOptions<WebTestClientResponse>
-
request
- Specified by:
requestin interfaceio.restassured.specification.RequestSenderOptions<WebTestClientResponse>
-
request
- Specified by:
requestin interfaceio.restassured.specification.RequestSenderOptions<WebTestClientResponse>
-
request
public WebTestClientResponse request(io.restassured.http.Method method, String path, Object... pathParams) - Specified by:
requestin interfaceio.restassured.specification.RequestSenderOptions<WebTestClientResponse>
-
request
- Specified by:
requestin interfaceio.restassured.specification.RequestSenderOptions<WebTestClientResponse>
-
request
- Specified by:
requestin interfaceio.restassured.specification.RequestSenderOptions<WebTestClientResponse>
-
request
- Specified by:
requestin interfaceio.restassured.specification.RequestSenderOptions<WebTestClientResponse>
-
request
- Specified by:
requestin interfaceio.restassured.specification.RequestSenderOptions<WebTestClientResponse>
-
request
- Specified by:
requestin interfaceio.restassured.specification.RequestSenderOptions<WebTestClientResponse>
-
getBasePath
-
getWebTestClientFactory
-
getCookies
public io.restassured.http.Cookies getCookies() -
getRequestHeaders
public io.restassured.http.Headers getRequestHeaders() -
getFormParams
-
getQueryParams
-
getPathParams
-
getParams
-
getAttributes
-
getMultiParts
-
getRequestLoggingFilter
public io.restassured.filter.log.RequestLoggingFilter getRequestLoggingFilter() -
getAsyncConfig
-
getRestAssuredWebTestClientConfig
-
getLogRepository
public io.restassured.internal.log.LogRepository getLogRepository() -
setRequestLoggingFilter
public void setRequestLoggingFilter(io.restassured.filter.log.RequestLoggingFilter requestLoggingFilter) -
getRestAssuredConfig
public io.restassured.config.RestAssuredConfig getRestAssuredConfig() -
basePath
-