I'm making web application. But I conflict big problem. In back-end, I made function for DELETE.
Here is DELETE function :
router.DELETE("/rsv/delete", func(c *gin.Context) {
//how to receive json data?
})
And I send json data by Ajax.
Here is Ajax function :
$.ajax({
url: "/rsv/delete",
type: "DELETE",
data: parse_delete,
contentType: "application/json",
success: function(result) {
if (result) {
alert("삭제가 완료되었습니다!");
location.href = "/member_index";
}
else {
alert("Error");
}
}
})
Please Help me.