'Response<T> vs T in Retrofit2 in Android

What is the difference between T vs Response<T> in Retrofit2?

interface TodoApi { 

    @GET("/todos")
    suspend fun getTodoList(): TodoList // TodoList vs Response<TodoList>
}

Just returning TodoList seems quite easy and get the work done.

Or there is any advantages of using Response<TodoList>?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source