Allow specifying default @Field values.
Author: FolydCreated Jul 9, 2015Updated Jul 16, 2026
As we know,we can use @Field annotation to specify a field in a @POST method, like this:
@POST
void doSomething(@Field String params,@Field String anotherParams)I need specify a default value to a field in a POST request,but i have no idea how to do it.
Does Retrofit support specify a default field for POST request? If not,cloud you add a feature to support this?
@POST
@DefaultField(params = "defaultValue")
void doSomething(@Field String anotherParams)Any comment is welcome.Thanks.:)
Source: lysine-dev/retrofit