📜  改造 - 任何代码示例

📅  最后修改于: 2022-03-11 14:56:00.054000             🧑  作者: Mango

代码示例8
public interface MyApiEndpointInterface {
    // Request method and URL specified in the annotation

    @GET("users/{username}")
    Call getUser(@Path("username") String username);

    @GET("group/{id}/users")
    Call> groupList(@Path("id") int groupId, @Query("sort") String sort);

    @POST("users/new")
    Call createUser(@Body User user);
}