retrofit
retrofit copied to clipboard
Request: update website to include example of how "User" class is declared
- [V ] Feature Request. Start by telling us what problem you’re trying to solve. Often a solution already exists! Don’t send pull requests to implement new features without first getting our support. Sometimes we leave features out on purpose to keep the project small.
As the title says, the "User" class is used on the website, but you can't see how it was declared:
https://square.github.io/retrofit/
For example, for this case:
@POST("users/new")
Call<User> createUser(@Body User user);
It could be as such, for example :
class User(
@SerializedName("first_name") val firstName: String?,
@SerializedName("last_name") val lastName: String?)
That example only works with Gson whereas we don't really specify what converter is being used.
@JakeWharton It's an example. It could be nice to see some samples.
In order to keep the website digestible I'm going to elect to leave this to the imagination.
@JakeWharton Please reconsider. Learning from samples helps a lot.