public abstract class RestDocumentationRequestBuilders extends Object
MockMvcRequestBuilders
that captures a request's URL
template and makes it available for documentation. Required when
) documenting path parameters
and recommended for general usage.public static MockHttpServletRequestBuilder get(String urlTemplate, Object... urlVariables)
MockHttpServletRequestBuilder
for a GET request. The url template
will be captured and made available for documentation.urlTemplate
- a URL template; the resulting URL will be encodedurlVariables
- zero or more URL variablespublic static MockHttpServletRequestBuilder get(URI uri)
MockHttpServletRequestBuilder
for a GET request.uri
- the URLpublic static MockHttpServletRequestBuilder post(String urlTemplate, Object... urlVariables)
MockHttpServletRequestBuilder
for a POST request. The url template
will be captured and made available for documentation.urlTemplate
- a URL template; the resulting URL will be encodedurlVariables
- zero or more URL variablespublic static MockHttpServletRequestBuilder post(URI uri)
MockHttpServletRequestBuilder
for a POST request.uri
- the URLpublic static MockHttpServletRequestBuilder put(String urlTemplate, Object... urlVariables)
MockHttpServletRequestBuilder
for a PUT request. The url template
will be captured and made available for documentation.urlTemplate
- a URL template; the resulting URL will be encodedurlVariables
- zero or more URL variablespublic static MockHttpServletRequestBuilder put(URI uri)
MockHttpServletRequestBuilder
for a PUT request.uri
- the URLpublic static MockHttpServletRequestBuilder patch(String urlTemplate, Object... urlVariables)
MockHttpServletRequestBuilder
for a PATCH request. The url
template will be captured and made available for documentation.urlTemplate
- a URL template; the resulting URL will be encodedurlVariables
- zero or more URL variablespublic static MockHttpServletRequestBuilder patch(URI uri)
MockHttpServletRequestBuilder
for a PATCH request.uri
- the URLpublic static MockHttpServletRequestBuilder delete(String urlTemplate, Object... urlVariables)
MockHttpServletRequestBuilder
for a DELETE request. The url
template will be captured and made available for documentation.urlTemplate
- a URL template; the resulting URL will be encodedurlVariables
- zero or more URL variablespublic static MockHttpServletRequestBuilder delete(URI uri)
MockHttpServletRequestBuilder
for a DELETE request.uri
- the URLpublic static MockHttpServletRequestBuilder options(String urlTemplate, Object... urlVariables)
MockHttpServletRequestBuilder
for an OPTIONS request. The url
template will be captured and made available for documentation.urlTemplate
- a URL template; the resulting URL will be encodedurlVariables
- zero or more URL variablespublic static MockHttpServletRequestBuilder options(URI uri)
MockHttpServletRequestBuilder
for an OPTIONS request.uri
- the URLpublic static MockHttpServletRequestBuilder head(String urlTemplate, Object... urlVariables)
MockHttpServletRequestBuilder
for a HEAD request. The url template
will be captured and made available for documentation.urlTemplate
- a URL template; the resulting URL will be encodedurlVariables
- zero or more URL variablespublic static MockHttpServletRequestBuilder head(URI uri)
MockHttpServletRequestBuilder
for a HEAD request.uri
- the URLpublic static MockHttpServletRequestBuilder request(HttpMethod httpMethod, String urlTemplate, Object... urlVariables)
MockHttpServletRequestBuilder
for a request with the given HTTP
method. The url template will be captured and made available for documentation.httpMethod
- the HTTP methodurlTemplate
- a URL template; the resulting URL will be encodedurlVariables
- zero or more URL variablespublic static MockHttpServletRequestBuilder request(HttpMethod httpMethod, URI uri)
MockHttpServletRequestBuilder
for a request with the given HTTP
method.httpMethod
- the HTTP method (GET, POST, etc)uri
- the URLpublic static MockMultipartHttpServletRequestBuilder fileUpload(String urlTemplate, Object... urlVariables)
MockHttpServletRequestBuilder
for a multipart request. The url
template will be captured and made available for documentation.urlTemplate
- a URL template; the resulting URL will be encodedurlVariables
- zero or more URL variablespublic static MockMultipartHttpServletRequestBuilder fileUpload(URI uri)
MockHttpServletRequestBuilder
for a multipart request.uri
- the URL