Class WebTestClientRequestSenderImpl
java.lang.Object
io.restassured.module.webtestclient.internal.WebTestClientRequestSenderImpl
- All Implemented Interfaces:
WebTestClientRequestSender,io.restassured.specification.RequestSenderOptions<WebTestClientResponse>
-
Constructor Summary
ConstructorsConstructorDescriptionWebTestClientRequestSenderImpl(org.springframework.test.web.reactive.server.WebTestClient webTestClient, Map<String, Object> params, Map<String, Object> namedPathParams, Map<String, Object> queryParams, Map<String, Object> formParams, Map<String, Object> attributes, RestAssuredWebTestClientConfig config, Object requestBody, io.restassured.http.Headers headers, io.restassured.http.Cookies cookies, List<io.restassured.internal.multipart.MultiPartInternal> multiParts, io.restassured.filter.log.RequestLoggingFilter requestLoggingFilter, String basePath, io.restassured.specification.ResponseSpecification responseSpecification, io.restassured.internal.log.LogRepository logRepository) -
Method Summary
Modifier and TypeMethodDescriptionconsumeWith(Consumer<org.springframework.test.web.reactive.server.EntityExchangeResult<byte[]>> consumer) Specify aConsumerto process the request result.delete()* Perform a DELETE request to a uri obtained from a {@link Function<>} that usesUriBuilderto generateURI.get()Perform a GET request to a uri obtained from a {@link Function<>} that usesUriBuilderto generateURI.head()* Perform a HEAD request to a uri obtained from a {@link Function<>} that usesUriBuilderto generateURI.options()* Perform a OPTIONS request to a uri obtained from a {@link Function<>} that usesUriBuilderto generateURI.patch()* Perform a PATCH request to a uri obtained from a {@link Function<>} that usesUriBuilderto generateURI.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.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.
-
Constructor Details
-
WebTestClientRequestSenderImpl
public WebTestClientRequestSenderImpl(org.springframework.test.web.reactive.server.WebTestClient webTestClient, Map<String, Object> params, Map<String, Object> namedPathParams, Map<String, Object> queryParams, Map<String, Object> formParams, Map<String, Object> attributes, RestAssuredWebTestClientConfig config, Object requestBody, io.restassured.http.Headers headers, io.restassured.http.Cookies cookies, List<io.restassured.internal.multipart.MultiPartInternal> multiParts, io.restassured.filter.log.RequestLoggingFilter requestLoggingFilter, String basePath, io.restassured.specification.ResponseSpecification responseSpecification, io.restassured.internal.log.LogRepository logRepository)
-
-
Method Details
-
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.
-
get
- Specified by:
getin interfaceio.restassured.specification.RequestSenderOptions<WebTestClientResponse>
-
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>
-
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>
-