## DELETE requests

<BlockSwitcher>
<Block name="Java">

```java
RestOptions options = RestOptions.builder()
    .addPath("/todo/1")
    .build();

Amplify.API.delete(options,
    response -> Log.i("MyAmplifyApp", "DELETE succeeded: " + response),
    error -> Log.e("MyAmplifyApp", "DELETE failed.", error)
);
```

</Block>
<Block name="Kotlin - Callbacks">

```kotlin
val options = RestOptions.builder()
    .addPath("/todo/1")
    .build()

Amplify.API.delete(options,
    { Log.i("MyAmplifyApp", "DELETE succeeded: $it") },
    { Log.e("MyAmplifyApp", "DELETE failed.", it) }
)
```

</Block>
<Block name="Kotlin - Coroutines">

```kotlin
val request = RestOptions.builder()
    .addPath("/todo/1")
    .build()
try {
    val response = Amplify.API.delete(request)
    Log.i("MyAmplifyApp", "DELETE succeeded: $response")
} catch (error: ApiException) {
    Log.e("MyAmplifyApp", "DELETE failed", error)
}
```

</Block>
<Block name="RxJava">

```java
RestOptions options = RestOptions.builder()
    .addPath("/todo/1")
    .build();

RxAmplify.API.delete(options)
    .subscribe(
        response -> Log.i("MyAmplifyApp", "DELETE succeeded: " + response),
        error -> Log.e("MyAmplifyApp", "DELETE failed.", error)
    );
```

</Block>
</BlockSwitcher>
