public async Task <IHttpActionResult> Delete() { var jsonReply = new JObject(); try { var postData = await ReadPostDataJson(); string indexerString = (string)postData["indexer"]; indexerService.DeleteIndexer(indexerString); } catch (Exception ex) { logger.Error(ex, "Exception in delete_indexer"); jsonReply["result"] = "error"; jsonReply["error"] = ex.Message; } return(Json(jsonReply)); }