@Documented
@Target(value=METHOD)
@Retention(value=RUNTIME)
public @interface HTTP
interface Service {
@HTTP(method = "CUSTOM", path = "custom/endpoint/")
Call<ResponseBody> customEndpoint();
}
This annotation can also used for sending DELETE
with a request body:
interface Service {
@HTTP(method = "DELETE", path = "remove/", hasBody = true)
Call<ResponseBody> deleteObject(@Body RequestBody object);
}
Modifier and Type | Required Element and Description |
---|---|
java.lang.String |
method |