I am using Retrofit like this to get all the books and delete all the books.
@GET(\"/books\") BookListResponse getAllBooks(); @DELETE(\"/clean\")
Just add the header accept in the request as follow:
Request request = new Request.Builder() .url(urlString) .header("accept", "application/json") .build();