mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-21 13:31:46 +00:00
MockMultipartHttpServletRequest pre-defines method "POST" and content type "multipart/form-data"
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3587 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
+6
@@ -47,6 +47,12 @@ public class MockMultipartHttpServletRequest extends MockHttpServletRequest impl
|
||||
new LinkedMultiValueMap<String, MultipartFile>();
|
||||
|
||||
|
||||
public MockMultipartHttpServletRequest() {
|
||||
setMethod("POST");
|
||||
setContentType("multipart/form-data");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Add a file to this request. The parameter name from the multipart
|
||||
* form is taken from the {@link MultipartFile#getName()}.
|
||||
|
||||
Reference in New Issue
Block a user