{"id":5872,"date":"2018-07-15T19:19:56","date_gmt":"2018-07-15T10:19:56","guid":{"rendered":"http:\/\/www.code-magagine.com\/?p=5872"},"modified":"2023-05-27T23:00:55","modified_gmt":"2023-05-27T14:00:55","slug":"%e3%80%90node-js%e3%80%91axios%e3%81%a8%e3%81%af%ef%bc%9f","status":"publish","type":"post","link":"http:\/\/www.code-magagine.com\/?p=5872","title":{"rendered":"\u3010Web\u958b\u767a\u3011\u300cREST-API(RESTful)\u300d\u3068\u306f\uff1f"},"content":{"rendered":"<h2>REST-API(RESTful)\u3068\u306f\uff1f<\/h2>\n<p>Web\u3067\u5916\u90e8\u547c\u51fa\u3057\u306e\u65b9\u5f0f\u306e\u4e00\u3064\u3067\u3001\u4f8b\u3048\u3070Ruby on Rails\u3067\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u3092\u5b9a\u7fa9\u3059\u308b\u5834\u5408\u306b\u73fe\u5728\u306f\u77e5\u3063\u3066\u3044\u3066\u5f53\u305f\u308a\u524d\u306e\u8a2d\u8a08\u601d\u60f3\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<h2>\u30ea\u30bd\u30fc\u30b9\u3068\u306f\uff1f<\/h2>\n<p>RESTful-API\u3067\u306f\u30ea\u30bd\u30fc\u30b9\u3068\u3044\u3046\u6982\u5ff5\u304c\u51fa\u3066\u304d\u307e\u3059\u304c\u3001\u5b9f\u4f53\u306f\u4e3b\u306b<span style=\"color: #ff0000;\"><strong>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u4fdd\u5b58\u3055\u308c\u3066\u3044\u308b\u30c7\u30fc\u30bf\u306e\u3053\u3068<\/strong><\/span>\u3067\u3059\u3002<\/p>\n<h2>REST-API\u306e\u8a2d\u8a08\u601d\u60f3<\/h2>\n<h3>\u30bb\u30c3\u30b7\u30e7\u30f3\u7b49\u3067\u72b6\u614b\u7ba1\u7406\u306f\u884c\u308f\u305a\u3001\u3084\u308a\u53d6\u308a\u3055\u308c\u308b\u60c5\u5831\u306f\u3001\u305d\u308c\u81ea\u4f53\u3067\u5b8c\u7d50\u3057\u3066\u3044\u308b\u3053\u3068\u3002<\/h3>\n<p>REST\u3067\u306f\u3001<span style=\"color: #ff0000;\"><strong>\u300c\u72b6\u614b\u300d<\/strong><\/span>\u3092\u6301\u3061\u307e\u305b\u3093\u3002<\/p>\n<p>\u306a\u306e\u3067\u3001SNS\u7b49\u306e\u591a\u304f\u306e\u30a2\u30af\u30bb\u30b9\u304c\u4e88\u60f3\u3055\u308c\u308b\u30b5\u30fc\u30d3\u30b9\u306e\u958b\u767a\u306b\u5411\u3044\u3066\u3044\u307e\u3059\u3002<\/p>\n<h3>URL\u306e\u6c7a\u5b9a\u5358\u4f4d\u306f\u3001\u30ea\u30bd\u30fc\u30b9\u5358\u4f4d<\/h3>\n<p>REST\u3067\u306f\u306a\u3044\u30a2\u30d7\u30ea\u306e\u5834\u5408\u306f\u3001\u767b\u9332\u3001\u66f4\u65b0\u3001\u524a\u9664\u7b49\u306e\u51e6\u7406\u5358\u4f4d\u3067\uff35\uff32\uff2c\u304c\u6c7a\u307e\u308a\u307e\u3059\u3002<\/p>\n<p>\u305f\u3060\u3001REST-API\u306e\u5834\u5408\u306f\u51e6\u7406\u5358\u4f4d\u3067\uff35\uff32\uff2c\u304c\u6c7a\u307e\u308b\u306e\u3067\u306f\u306a\u304f\u3001<span style=\"color: #ff0000;\"><strong>\u30ea\u30bd\u30fc\u30b9\uff08\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u4e0a\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\uff09\u5358\u4f4d\u3067\uff35\uff32\uff2c\u304c\u6c7a\u307e\u308a\u307e\u3059\u3002<\/strong><\/span>\u30ea\u30bd\u30fc\u30b9\u306b\u5bfe\u3059\u308bCRUD\u64cd\u4f5c\u306f\u3059\u3079\u3066HTTP\u30e1\u30bd\u30c3\u30c9\u3067\u8868\u73fe\u3092\u3057\u307e\u3059\u3002<\/p>\n<h3>\u30ea\u30bd\u30fc\u30b9\u3078\u306e\u64cd\u4f5c\u8868\u73fe\u304cHTTP\u30e1\u30bd\u30c3\u30c9\u3068\u3057\u3066\u7d71\u4e00\u3055\u308c\u3066\u3044\u308b\u3002<\/h3>\n<p>\u64cd\u4f5c\u8868\u73fe\u3092\u7d71\u4e00\u3059\u308b\u305f\u3081\u306b\u4e00\u822c\u7684\u306a\u30d6\u30e9\u30a6\u30b6\u304c\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u308bGET\/POST\u3060\u3051\u3067\u306a\u304f<span style=\"color: #ff0000;\"><strong>PATCH\u3001PUT\u3001DELETE<\/strong><\/span>\u3068\u8a00\u3063\u305fHTTP\u30e1\u30bd\u30c3\u30c9\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<h2>HTTP\u30e1\u30bd\u30c3\u30c9<\/h2>\n<table>\n<tbody>\n<tr>\n<th>\u30e1\u30bd\u30c3\u30c9\u540d<\/th>\n<th>\u51e6\u7406<\/th>\n<\/tr>\n<tr>\n<td>GET<\/td>\n<td>\u53d6\u5f97<\/td>\n<\/tr>\n<tr>\n<td>POST<\/td>\n<td>\u767b\u9332<\/td>\n<\/tr>\n<tr>\n<td>PATCH<\/td>\n<td>\u66f4\u65b0<\/td>\n<\/tr>\n<tr>\n<td>PUT<\/td>\n<td>\u66f4\u65b0<\/td>\n<\/tr>\n<tr>\n<td>DELETE<\/td>\n<td>\u524a\u9664<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>GET<\/h3>\n<ul>\n<li>\u691c\u7d22\u51e6\u7406<\/li>\n<li>\u60c5\u5831\u306e\u53d6\u5f97<\/li>\n<li>\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u51e6\u7406<\/li>\n<li>\u4e00\u89a7\u8868\u793a\u51e6\u7406<\/li>\n<\/ul>\n<h3>POST(PUT)<\/h3>\n<ul>\n<li>\u30c7\u30fc\u30bf\u4f5c\u6210\u3001\u8ffd\u52a0\u51e6\u7406<\/li>\n<li>\u753b\u50cf\u306e\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u51e6\u7406<\/li>\n<li>SNS\u3067\u306e\u30b9\u30c6\u30fc\u30bf\u30b9\u306e\u5171\u6709\u51e6\u7406<\/li>\n<\/ul>\n<p>\u307e\u305f\u3001POST\u30e1\u30bd\u30c3\u30c9\u306f<span style=\"color: #ff0000;\"><strong>\u9069\u3057\u305f\u30e1\u30bd\u30c3\u30c9\u304c\u306a\u3044\u5834\u5408\u306b\u4f7f\u308f\u308c\u308b\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30e1\u30bd\u30c3\u30c9<\/strong><\/span>\u3067\u3082\u3042\u308a\u307e\u3059\u3002\uff08\u4f8b\u3048\u3070\u3001\u30b7\u30e7\u30c3\u30d4\u30f3\u30b0\u30ab\u30fc\u30c8\u306e\u30c1\u30a7\u30c3\u30af\u30a2\u30a6\u30c8\u51e6\u7406\u7b49\uff09<\/p>\n<h3>PATCH\/PUT<\/h3>\n<ul>\n<li>\u60c5\u5831\u66f4\u65b0\u51e6\u7406\uff08\u30b9\u30c6\u30fc\u30bf\u30b9\u5909\u66f4\u51e6\u7406\uff09<\/li>\n<li>\u5546\u54c1\u4ea4\u63db\u51e6\u7406<\/li>\n<\/ul>\n<h3>DELETE<\/h3>\n<ul>\n<li>\u60c5\u5831\u306e\u524a\u9664\u51e6\u7406<\/li>\n<li>\u5546\u54c1\u306e\u30ad\u30e3\u30f3\u30bb\u30eb\u51e6\u7406<\/li>\n<li>\u30af\u30ed\u30fc\u30ba\u51e6\u7406<\/li>\n<li>\u30bf\u30a4\u30de\u30fc\u306e\u505c\u6b62\u51e6\u7406<\/li>\n<\/ul>\n<h2>REST-API\u306e\u30e1\u30ea\u30c3\u30c8\u3001\u30c7\u30e1\u30ea\u30c3\u30c8<\/h2>\n<h3>\u30e1\u30ea\u30c3\u30c8<\/h3>\n<ul>\n<li>\u30b9\u30c6\u30fc\u30c8\u30ec\u30b9\u306a\u901a\u4fe1\u306a\u306e\u3067\u3001\u30a2\u30af\u30bb\u30b9\u96c6\u4e2d\u306b\u8010\u3048\u3084\u3059\u3044\u3002\uff08\uff33\uff2e\uff33\u958b\u767a\u306b\u3088\u304f\u4f7f\u308f\u308c\u3066\u3044\u307e\u3059\u3002\uff09<\/li>\n<\/ul>\n<h3>\u30c7\u30e1\u30ea\u30c3\u30c8<\/h3>\n<ul>\n<li>\u5f93\u6765\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u3067\u306f\u30b9\u30c6\u30fc\u30c8\u30ec\u30b9\u6307\u5411\u3067\u306f\u306a\u3044\u306e\u3067\u3001\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u304c\u7c21\u6f54\u306b\u306f\u306a\u308a\u306b\u304f\u3044\u3002<\/li>\n<\/ul>\n<h2>\u3069\u306e\u7a0b\u5ea6REST\u3092\u8ffd\u6c42\u3059\u308b\u3079\u304d\u304b\u3002<\/h2>\n<p>\u30ea\u30bd\u30fc\u30b9\u306e\u968e\u5c64\u304c\u6d45\u3044\u5834\u5408\u306f\u305d\u308c\u307b\u3069\u82e6\u52b4\u306a\u304fREST\u306f\u5b9f\u88c5\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\u3002\u3057\u304b\u3057\u3001<span style=\"color: #ff0000;\"><strong>\u30ea\u30bd\u30fc\u30b9\u306e\u968e\u5c64\u304c\u6df1\u304f\u306a\u3063\u3066\u3044\u304f\u3068REST\u306e\u5b9f\u88c5\u304c\u5927\u5909\u306b\u306a\u3063\u3066\u3044\u304d\u307e\u3059\u3002<\/strong><\/span>\u306a\u306e\u3067\u3001\u73fe\u5b9f\u7684\u306b\u306fREST\u306e\u539f\u5247\u3092\u7406\u89e3\u3057\u3064\u3064Rails\u3067\u5b9f\u88c5\u3057\u3084\u3059\u3044\u7bc4\u56f2\u3067\u5b9f\u73fe\u3059\u308b\u306e\u304c\u826f\u3044\u3067\u3057\u3087\u3046\u3002<\/p>\n<h2>\u5b9f\u88c5\u306b\u3064\u3044\u3066<\/h2>\n<p>GET\u3084POST\u7b49\u306eHTTP\u30e1\u30bd\u30c3\u30c9\u3092\u9001\u4fe1\u3057\u305f\u304b\u3089\u81ea\u52d5\u3067\u30ea\u30bd\u30fc\u30b9\u3092<span style=\"color: #ff0000;\"><strong>\u826f\u304d\u3088\u3046\u306bREST\u304c\u66f4\u65b0\u3057\u3066\u304f\u308c\u308b\u3068\u3044\u3046\u308f\u3051\u3067\u306f\u306a\u304f\u5404HTTP\u30e1\u30bd\u30c3\u30c9\u306b\u3088\u3063\u3066\u3069\u306e\u3088\u3046\u306a\u51e6\u7406\u3092\u884c\u308f\u305b\u308b\u306e\u304b\u306f\u30d7\u30ed\u30b0\u30e9\u30de\u30fc\u306e\u5b9f\u88c5\u306b\u3088\u3063\u3066\u884c\u308f\u308c\u307e\u3059\u3002<\/strong><\/span>REST\u306f\u3042\u304f\u307e\u3067\u8a2d\u8a08\u306b\u304a\u3051\u308b\u6982\u5ff5\u7684\u306a\u7269\u3068\u3044\u3046\u3088\u3046\u306a\u8a8d\u8b58\u304c\u5fc5\u8981\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"REST-API(RESTful)\u3068\u306f\uff1f Web\u3067\u5916\u90e8\u547c\u51fa\u3057\u306e\u65b9\u5f0f\u306e\u4e00\u3064\u3067\u3001\u4f8b\u3048\u3070Ruby on Rails\u3067\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u3092\u5b9a\u7fa9\u3059\u308b\u5834\u5408\u306b\u73fe\u5728\u306f\u77e5\u3063\u3066\u3044\u3066\u5f53\u305f\u308a\u524d\u306e\u8a2d\u8a08\u601d\u60f3\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002 \u30ea\u30bd\u30fc\u30b9\u3068\u306f\uff1f RESTful [&hellip;]","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[36,8],"tags":[],"_links":{"self":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/5872"}],"collection":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5872"}],"version-history":[{"count":20,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/5872\/revisions"}],"predecessor-version":[{"id":20547,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/5872\/revisions\/20547"}],"wp:attachment":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5872"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5872"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5872"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}