A multipart/form-data
request can contain multiple sub-request bodies, each with its own separate header and body. Each sub-request body has its own separate header and body, and is typically used for file uploads. Here we use RestTemplate
to send a multipart/form-data
request.
RestTemplate
It’s really simple, it’s all in the code.
|
|
Testing
Server
A simple Controller
that reads all the information submitted by the client.
|
|
Console Logs
|
|
NoClassDefFoundError
If the client application throws a NoClassDefFoundError
exception.
|
|
Then you may need to add the following dependencies to the client.