Closed SimonStefan closed 10 months ago
After a fork I realized a method to allow multipart requests with the current version. I'd like to share it for others as a reference:
MockHttpServletRequestBuilder multipart = MockMvcRequestBuilders.multipart("/path")
.file(multipartFile)
.with(MockMvcRequestBuilderUtils.form(form));
Hi @SimonStefan,
I am glad you found a solution, and thank you for sharing it!
Hi @f-lopes , it is very common to send files together with a form. It would be nice to add full support for multipart requests or at least set some methods to public so that the main functionality can be accessed.
Kind regards, Stefan