java – Send List of objects and each object has images list retrofit android-ThrowExceptions

Exception or error:

I want to send a list of objects of type ‘OfflineModel‘, and inside each object. I have a list of images to send.

How to do this operation?

public class OfflineModel implements Serializable {

    private String round;
    private String description;
    private RequestBody note;
    private RequestBody blocked;

    private int missionId;
    private RequestBody latitude;
    private RequestBody longitude;
    private List<MultipartBody.Part> images;

and this is the endpoint:

Observable<MissionUser> finish(
        @Body List<OfflineModel> offlineModelList, 
        @Path(value = "id") int id

I don’t know if the above method is correct or not, Do I have to use multipart?

How to solve:

Leave a Reply

Your email address will not be published. Required fields are marked *