@Documented
@Target(value=PARAMETER)
@Retention(value=RUNTIME)
public @interface Field
Values may be null
which will omit them from the request body.
Simple Example:
@FormUrlEncoded @POST("/") void example(@Field("name") String name, @Field("occupation") String occupation); }Calling with
foo.example("Bob Smith", "President")
yields a request body of
name=Bob+Smith&occupation=President
.FormUrlEncoded
,
FieldMap
Modifier and Type | Required Element and Description |
---|---|
java.lang.String |
value |
Copyright © 2014 Square, Inc.. All Rights Reserved.