Annotation Type FormUrlEncoded


@Documented @Retention(RUNTIME) @Target(METHOD) public @interface FormUrlEncoded
Marks a method as sending an application/x-www-form-urlencoded body built from its @Field/@FieldMap-annotated parameters, instead of the JSON/raw-string body a @Body parameter would send, or the multipart/form-data body @Multipart would send. Valid only on @POST, @PUT, @PATCH, and @DELETE methods - using it on @GET, @HEAD, or @OPTIONS fails validation, same as @Body/@Multipart. A method can't combine @FormUrlEncoded with a @Body parameter or @Multipart, and needs at least one @Field/@FieldMap parameter to be worth declaring form-urlencoded at all.
@POST("/oauth/token")
 @FormUrlEncoded
 String getToken(@Field("grant_type") String grantType, @Field("client_id") String clientId);