My DELETE API on swagger is accepting an array of ids to delete. Like this:
[
42
]
I have following code in angular v15. I am not getting how to pass an array of ids as a body to this delete API.
deleteProduct(productId: number): Observable<any> {
let frequencyArray = JSON.parse("[2023]");
return this.http
.delete(this.baseUrl + "api/Product/deleteproduct", frequencyArray)
.pipe(map((data) => data));
}
Above code is giving an error:
Media type unsupported
I have searched a lot of things, but I am not getting any solution.