且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用改造将列表发送到服务器:2.1.0 - Android?

更新时间:2023-01-01 17:00:43

您只需要将列表本身作为正文发送

You just need to send the list itself as a Body

public interface Interface_CreateClass {
    @POST("SetData/CreateClass")
    Call<JsonGet_CreateClass> getJSONCreateClass(@Query("username") String username,
                                                 @Body List<ClassSchedule> classSchedule);
}

注意:我认为您不能在同一个请求中将两个参数注释为 Body.

Notice: I think you can't have two parameters annotated as Body in the same request.