Using Retrofit to make request to a spring-data-rest instance, running into trouble sending multipart request.
Retrofit
@Multipart
@POST(URI)
void save(@Part("request[data][param][event]") Event event,
Callback<Resource<Event>> callback);
Spring
@RequestMapping(value=URI, method=RequestMethod.POST)
public @ResponseBody HttpEntity<Event> addEvent(@RequestPart Event event) {
...
}
With this, I'm getting a 400 Bad Request: "Required request part 'event' is not present."
Assuming the Event object has a String name & Bitmap image, what's the proper way to handle this?