@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);
}
public abstract String method
Copyright © 2017 Square, Inc.. All rights reserved.