{"id":6834,"date":"2024-12-26T10:44:04","date_gmt":"2024-12-26T01:44:04","guid":{"rendered":"https:\/\/taitan916.info\/blog\/?p=6834"},"modified":"2024-11-05T16:46:28","modified_gmt":"2024-11-05T07:46:28","slug":"post-6834","status":"publish","type":"post","link":"https:\/\/taitan916.info\/blog\/archives\/6834","title":{"rendered":"Ajax\u306b\u3066HTTP\u30ea\u30af\u30a8\u30b9\u30c8\u30e1\u30bd\u30c3\u30c9\u3092DELETE \/ PUT\u3067\u9001\u4fe1\u3059\u308b\u65b9\u6cd5"},"content":{"rendered":"<p>\u3042\u308bAPI\u306bAjax\u3067\u30ea\u30af\u30a8\u30b9\u30c8\u3059\u308b\u969b\u3001GET \/ POST\u3067\u306f\u306a\u304fDELETE \/ PUT\u3067\u9001\u4fe1\u3059\u308b\u5fc5\u8981\u304c\u3042\u3063\u305f\u3002\u3053\u306e\u3088\u3046\u306aHTTP\u30ea\u30af\u30a8\u30b9\u30c8\u30e1\u30bd\u30c3\u30c9\u306f\u307b\u307c\u53d6\u308a\u6271\u3063\u305f\u3053\u3068\u304c\u7121\u3044\u306e\u3067\u3069\u3046\u3057\u305f\u3089\u3044\u3044\u306e\u304b\u8abf\u3079\u305f\u3068\u3053\u308d\u3001\u666e\u901a\u306btype\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u6307\u5b9a\u3067\u304d\u308b\u307f\u305f\u3044\u3002\u4ee5\u4e0b\u306b\u5bfe\u5fdc\u65b9\u6cd5\u3092\u30e1\u30e2\u3002<\/p>\n<p>&nbsp;<\/p>\n<h2>\u5bfe\u5fdc\u65b9\u6cd5<\/h2>\n<h3>Ajax\u5074<\/h3>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">&lt;script&gt;\r\n$(function(){\r\n    $.ajax({\r\n        url:'.\/method.php',\r\n        type: 'DELETE', \/\/PUT\u3067\u3082OK\r\n    }).done(function(result){\r\n        console.log(result);\r\n    }).fail(function() {\r\n\r\n    }).always(function() {\r\n\r\n    });\r\n});\r\n&lt;\/script&gt;<\/pre>\n<h3>HTTP\u30ea\u30af\u30a8\u30b9\u30c8\u30e1\u30bd\u30c3\u30c9\u306e\u78ba\u8a8d\u5074(method.php)<\/h3>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">&lt;?php\r\necho $_SERVER['REQUEST_METHOD'];<\/pre>\n<p>&nbsp;<\/p>\n<h2>\u53c2\u8003\u30b5\u30a4\u30c8<\/h2>\n<p><a href=\"https:\/\/stackoverflow.com\/questions\/2153917\/how-to-send-a-put-delete-request-in-jquery\" target=\"_blank\" rel=\"noopener\">https:\/\/stackoverflow.com\/questions\/2153917\/how-to-send-a-put-delete-request-in-jquery<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3042\u308bAPI\u306bAjax\u3067\u30ea\u30af\u30a8\u30b9\u30c8\u3059\u308b\u969b\u3001GET \/ POST\u3067\u306f\u306a\u304fDELETE ... <\/p>\n","protected":false},"author":1,"featured_media":1071,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[3,4],"tags":[],"class_list":["post-6834","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-jquery","category-javascript"],"acf":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/posts\/6834","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/comments?post=6834"}],"version-history":[{"count":2,"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/posts\/6834\/revisions"}],"predecessor-version":[{"id":6836,"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/posts\/6834\/revisions\/6836"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/media\/1071"}],"wp:attachment":[{"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/media?parent=6834"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/categories?post=6834"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/tags?post=6834"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}