When I try to create a delete method:
public interface ImageService {
@DELETE(\"api/v1/attachment\")
Call delete(@Body DeleteMode
Originally answered here : https://stackoverflow.com/a/62920127/8956093
Kotlin Code :
path is not required if your first argument to interface method is a url annotated with @Url
Example :
@HTTP(method = "DELETE", hasBody = true)
fun deleteStudentFromDatabase(
@Url url: String,
@Body payload: StudentModel
): Observable
If first argument to interface method is not a url then use this
@HTTP(method = "DELETE", path = "{urlPath}", hasBody = true)
fun deleteStudentFromDatabase(
@Body payload: StudentModel,
@Path("urlPath") url: String
): Observable