Build multipart only when resource and media body provided