Uses of Class
org.springframework.test.web.servlet.request.MockHttpServletRequestBuilder
Packages that use MockHttpServletRequestBuilder
- 
Uses of MockHttpServletRequestBuilder in org.springframework.test.web.servlet.requestMethods in org.springframework.test.web.servlet.request that return MockHttpServletRequestBuilderModifier and TypeMethodDescriptionSet theAcceptheader using raw String values, possibly not even well-formed (for testing purposes).Set the 'Accept' header to the given media type(s).MockHttpServletRequestBuilder.characterEncoding(String encoding) Set the character encoding of the request.MockHttpServletRequestBuilder.characterEncoding(Charset encoding) Set the character encoding of the request.MockHttpServletRequestBuilder.content(byte[] content) Set the request body.Set the request body as a UTF-8 String.MockHttpServletRequestBuilder.contentType(String contentType) Set the 'Content-Type' header of the request as a raw String value, possibly not even well-formed (for testing purposes).MockHttpServletRequestBuilder.contentType(MediaType contentType) Set the 'Content-Type' header of the request.MockHttpServletRequestBuilder.contextPath(String contextPath) Specify the portion of the requestURI that represents the context path.Add the given cookies to the request.Create aMockHttpServletRequestBuilderfor a DELETE request.Create aMockHttpServletRequestBuilderfor a DELETE request.Set an "input" flash attribute.MockHttpServletRequestBuilder.flashAttrs(Map<String, Object> flashAttributes) Set flash attributes.Append the given value(s) to the given form field and also add them to the request parameters map.MockHttpServletRequestBuilder.formFields(MultiValueMap<String, String> formFields) Variant offormField(String, String...)with aMultiValueMap.Create aMockHttpServletRequestBuilderfor a GET request.Create aMockHttpServletRequestBuilderfor a GET request.Create aMockHttpServletRequestBuilderfor a HEAD request.Create aMockHttpServletRequestBuilderfor a HEAD request.Add a header to the request.MockHttpServletRequestBuilder.headers(HttpHeaders httpHeaders) Add all headers to the request.Set the locale of the request, overriding any previous locales.Add the specified locales as preferred request locales.Create aMockHttpServletRequestBuilderfor an OPTIONS request.Create aMockHttpServletRequestBuilderfor an OPTIONS request.Add a request parameter toMockHttpServletRequest.getParameterMap().MockHttpServletRequestBuilder.params(MultiValueMap<String, String> params) Variant ofparam(String, String...)with aMultiValueMap.Create aMockHttpServletRequestBuilderfor a PATCH request.Create aMockHttpServletRequestBuilderfor a PATCH request.Specify the portion of the requestURI that represents the pathInfo.Create aMockHttpServletRequestBuilderfor a POST request.Create aMockHttpServletRequestBuilderfor a POST request.Set the principal of the request.Create aMockHttpServletRequestBuilderfor a PUT request.Create aMockHttpServletRequestBuilderfor a PUT request.MockHttpServletRequestBuilder.queryParam(String name, String... values) Append to the query string and also add to therequest parametersmap.MockHttpServletRequestBuilder.queryParams(MultiValueMap<String, String> params) Append to the query string and also add to therequest parametersmap.MockHttpServletRequestBuilder.remoteAddress(String remoteAddress) Set the remote address of the request.Alternative factory method that allows for custom HTTP verbs (e.g.MockMvcRequestBuilders.request(HttpMethod method, String urlTemplate, Object... uriVariables) Create aMockHttpServletRequestBuilderfor a request with the given HTTP method.MockMvcRequestBuilders.request(HttpMethod httpMethod, URI uri) Create aMockHttpServletRequestBuilderfor a request with the given HTTP method.MockHttpServletRequestBuilder.requestAttr(String name, Object value) Set a request attribute.MockHttpServletRequestBuilder.secure(boolean secure) Set the secure property of theServletRequestindicating use of a secure channel, such as HTTPS.MockHttpServletRequestBuilder.servletPath(String servletPath) Specify the portion of the requestURI that represents the path to which the Servlet is mapped.MockHttpServletRequestBuilder.session(MockHttpSession session) Set the HTTP session to use, possibly re-used across requests.MockHttpServletRequestBuilder.sessionAttr(String name, Object value) Set a session attribute.MockHttpServletRequestBuilder.sessionAttrs(Map<String, Object> sessionAttributes) Set session attributes.MockHttpServletRequestBuilder.with(RequestPostProcessor postProcessor) An extension point for further initialization ofMockHttpServletRequestin ways not built directly into theMockHttpServletRequestBuilder.