I need to execute a DELETE query using Retrofit. So, my piece of interface code looks like this:
@DELETE("/api/item/{id}") void deleteItem(@Path("id") int itemId);
But I get the error:
java.lang.IllegalArgumentException: ApiItem.deleteItem: there must be either a return type or a callback as the last argument.
However, according to the rules of the API Rest, I should not receive a response to a DELETE request. How to specify it in the interface?
Thanks.
java android rest retrofit
Mark korzhov
source share