{"id":2245,"date":"2021-09-28T03:35:37","date_gmt":"2021-09-27T19:35:37","guid":{"rendered":"https:\/\/www.develop-note.com\/blog\/?p=2245"},"modified":"2022-02-16T17:37:40","modified_gmt":"2022-02-16T09:37:40","slug":"routing","status":"publish","type":"post","link":"https:\/\/www.develop-note.com\/blog\/2021\/09\/28\/routing\/","title":{"rendered":"D-17 \u8def\u7531 ? Routing"},"content":{"rendered":"<h1>\u8def\u7531\u7684\u4ecb\u7d39<\/h1>\n<p>\u5728\u6b77\u7d93\u6628\u5929\u7db2\u9801\u7a0b\u5f0f\u7684\u57fa\u790e\u77e5\u8b58\u7684\u4ecb\u7d39\u4e4b\u5f8c\uff0c\u4eca\u5929\u5c0f\u5149\u7d42\u65bc\u8981\u958b\u59cb\u9032\u5165\u7db2\u9801\u7a0b\u5f0f\u7684\u958b\u767c\u4e86\uff0c\u6240\u4ee5\u4eca\u5929\u5c0f\u5149\u6703\u5b78\u5230\u751a\u9ebc\u6771\u897f\u5462\u3002<\/p>\n<p><!--more--><\/p>\n<h2>\u8def\u7531 Routing<\/h2>\n<p>\u300c\u54c7\uff0c\u6628\u5929\u7684\u57fa\u790e\u77e5\u8b58\u771f\u7684\u662f\u8b93\u6211\u6536\u7a6b\u826f\u591a\u963f\u300d<br \/>\n\u5c0f\u5149\u4e00\u9032\u516c\u53f8\u5c31\u63a2\u982d\u63a2\u8166\u5730\u8d70\u5230\u5927\u982d\u7684\u5ea7\u4f4d\u524d\uff0c\u7136\u800c\u5927\u982d\u4ecd\u57cb\u982d\u5728\u9700\u6c42\u6587\u4ef6\u4e2d\u52aa\u529b\u958b\u767c\uff0c\u4f46\u662f\u4ed6\u9084\u662f\u56de\u61c9\u4e86\u5c0f\u5149\u7684\u8a71\u3002<br \/>\n\u300c\u54c8\u54c8\u54c8\uff0c\u6211\u77e5\u9053\u4f60\u6628\u5929\u807d\u7684\u982d\u660f\u8166\u8139\u7684\uff0c\u4e0d\u904e\u57fa\u790e\u77e5\u8b58\u5f88\u91cd\u8981\uff0c\u5c24\u5176\u662f\u8001K\u524d\u8f29\u8ddf\u4f60\u4ecb\u7d39\u7684\u90a3\u4e9b\u3002\u300d<br \/>\n\u807d\u5230\u9019\u88e1\u5c0f\u5149\u5fcd\u4e0d\u4f4f\u5410\u820c\u982d\u505a\u9b3c\u81c9\u4f86\u8868\u793a\u4ed6\u7684\u4e0d\u597d\u610f\u601d\uff0c\u63a5\u8457\u7a81\u7136\u60f3\u5230\u751a\u9ebc\u4f3c\u7684\u554f\u500b\u554f\u984c\u3002<br \/>\n\u300c\u524d\u8f29\uff0c\u95dc\u65bc\u6628\u5929Request Pipeline\u4e2d\u7684Routing\u662f\u751a\u9ebc\u963f\u3002\u300d<br \/>\n\u9019\u6642\u525b\u597d\u5927\u982d\u958b\u767c\u544a\u4e00\u6bb5\u843d\u5f8c\uff0c\u4ed6\u559d\u4e86\u676f\u6c34\u4e26\u62ac\u8d77\u982d\u4f86\u8ddf\u5c0f\u5149\u9019\u9ebc\u8aaa\u3002<br \/>\n\u300c\u90a3\u500b\u963f\uff0c\u7c21\u55ae\u8b1b\u5c31\u662f\u600e\u9ebc\u6a23\u900f\u904eURL\u5230\u4f60\u7a0b\u5f0f\u7684\u6307\u5f15\u963f\u3002\u300d<br \/>\n\u807d\u5230\u9019\u500b\u56de\u7b54\uff0c\u5c0f\u5149\u8868\u73fe\u51fa\u4f3c\u61c2\u975e\u61c2\u7684\u6a23\u5b50\uff0c\u6240\u4ee5\u770b\u5230\u5c0f\u5149\u7684\u8868\u60c5\u5f8c\u5927\u982d\u7e7c\u7e8c\u8aaa\u4e0b\u53bb\u3002<br \/>\n\u300c\u600e\u9ebc\uff0c\u60f3\u8981\u66f4\u9032\u4e00\u6b65\u4e86\u89e3\u4e00\u4e0b\u55ce\u3002\u300d<br \/>\n\u9019\u6642\u5c0f\u5149\u5f88\u731b\u70c8\u7684\u9ede\u982d\uff0c\u770b\u5230\u5c0f\u5149\u7684\u6a23\u5b50\u5927\u982d\u5c31\u7e7c\u7e8c\u8aaa\u4e0b\u53bb\u3002<br \/>\n\u300c\u597d\u5427\uff0c\u90a3\u6211\u5011\u5c31\u4f86\u4e86\u89e3\u4e00\u4e0b\u751a\u9ebc\u662f\u8def\u7531\u4ee5\u53ca\u5982\u4f55\u8a2d\u5b9a\u4ed6\u3002\u300d<\/p>\n<h3>\u8def\u7531\u662f\u751a\u9ebc<\/h3>\n<p>\u9019\u908a\u5148\u770b\u4e00\u4e0b<a href=\"https:\/\/docs.microsoft.com\/zh-tw\/aspnet\/core\/fundamentals\/routing\" title=\"Routing\" rel=\"nofollow noopener\" target=\"_blank\">Routing<\/a>\u662f\u751a\u9ebc\uff0c\u5176\u4e2dMSDN\u4e2d\u8aaa\u300c\u8def\u7531\u6703\u8ca0\u8cac\u6bd4\u5c0d\u50b3\u5165\u7684 HTTP \u8981\u6c42\uff0c\u4e26\u5c07\u9019\u4e9b\u8981\u6c42\u5206\u6d3e\u81f3\u61c9\u7528\u7a0b\u5f0f\u7684\u53ef\u57f7\u884c\u7aef\u9ede\u300d\uff0c\u6240\u4ee5\u7c21\u55ae\u8b1b\u4f86\u5c31\u662f\u8acb\u6c42\u5982\u4f55\u900f\u904eUrl\u7db2\u5740\u4f86\u5230\u9054\u6211\u5011\u5beb\u7684Code\u4e4b\u9593\u7684\u5c0d\u61c9\uff0c\u7136\u800c\u4e0d\u540c\u7684\u7db2\u61c9\u7a0b\u5f0f\u985e\u5225\u4ed6\u7684\u5c0d\u61c9\u4e5f\u5c31\u4e0d\u540c\uff0c\u6240\u4ee5\u6211\u5011\u9019\u908a\u4ee5MVC\u8ddfWebApi\u70ba\u4f8b\u5b50\u4f86\u8aaa\u660e\u5982\u4f55\u8a2d\u5b9a\u8def\u7531\uff0c\u7576\u7136\u6709\u8208\u8da3\u4e86\u89e3gRpc\u8ddfRazorPage\u7684\u670b\u53cb\u5011\u53ef\u4ee5\u8a73\u7d30\u770b\u4e00\u4e0b<a href=\"https:\/\/docs.microsoft.com\/zh-tw\/aspnet\/core\/fundamentals\/routing\" title=\"Routing\" rel=\"nofollow noopener\" target=\"_blank\">Routing<\/a>\u9019\u7bc7\u6587\u7ae0\u3002<\/p>\n<h3>\u8def\u7531\u8a2d\u5b9a\u7684\u5730\u65b9<\/h3>\n<p>\u5728Mvc\u8207WebApi\u8a2d\u5b9a\u8def\u7531\u4e3b\u8981\u8981\u8a2d\u5b9a\u5169\u500b\u5730\u65b9\uff0c<code>Startup<\/code>\u8ddf<code>Controller<\/code>\u7684<code>Attribute<\/code>\uff0c\u6240\u4ee5\u63a5\u4e0b\u4f86\u5206\u5225\u4ecb\u7d39\u9019\u5169\u500b\u90e8\u5206\u8981\u8a2d\u5b9a\u751a\u9ebc\uff0c\u9996\u5148\u5148\u4ecb\u7d39<code>Startup<\/code>\u7684\u8a2d\u5b9a\u3002<\/p>\n<h4>Startup\u7684\u8a2d\u5b9a\u5730\u65b9<\/h4>\n<p>\u9019\u90e8\u5206\u4e3b\u8981\u8981\u8a2d\u5b9a\u7684\u6771\u897f\u5982\u4e0b\u5217\u6240\u793a\uff0c\u9996\u5148\u4ecb\u7d39Mvc\u7684\u8a2d\u5b9a\u3002<\/p>\n<h4>Mvc\u8def\u7531\u7684\u8a2d\u5b9a\u5167\u5bb9<\/h4>\n<pre><code class=\"language-cs\">public void Configure(IApplicationBuilder app, \n    IWebHostEnvironment env)\n{\n    .\n    .\n    .\n    app.UseRouting();\n\n    app.UseEndpoints(endpoints =&gt;\n    {\n        endpoints.MapControllerRoute(\n            name: &quot;default&quot;,\n            pattern: &quot;{controller=Home}\/{action=Index}\/{id?}&quot;);\n    });\n    .\n    .\n    .\n}<\/code><\/pre>\n<p>\u900f\u904e\u4e0a\u8ff0\u8a2d\u5b9a\uff0c\u5927\u90e8\u5206\u7684\u8def\u7531\u90fd\u6703\u8d70<code>default<\/code>\u9019\u500b\u8a2d\u5b9a\uff0c\u4f8b\u5982<code>\/Products\/Details\/5<\/code>\u9019\u6a23\u7684Url\u5c31\u6703\u5c0d\u61c9\u5230\u4ee5\u4e0b\u7684\u7a0b\u5f0f\u78bc\u7684<code>Details<\/code>\u4e26\u4e14\u5e36<code>int<\/code>\u53c3\u6578\u7684Action\u5167\u3002<\/p>\n<pre><code class=\"language-cs\">public class ProductsController : Controller\n{\n    public IActionResult Details(int id)\n    {\n        ...\n    }\n}<\/code><\/pre>\n<p>\u4e0d\u904e\u5176\u5be6\u4e0a\u8ff0\u4f8b\u5b50\u4e2d\u7684<code>MapControllerRoute<\/code>\u4e5f\u53ef\u4ee5\u7c21\u5316\u70ba\u4e0b\u5217\u4f8b\u5b50\u3002<\/p>\n<pre><code class=\"language-cs\">    app.MapDefaultControllerRoute();<\/code><\/pre>\n<p>\u7136\u5f8c\u8def\u7684\u8a2d\u5b9a\u53ef\u4ee5\u8a2d\u5b9a\u591a\u7d44\uff0c\u4f8b\u5982\u4e0b\u5217\u4f8b\u5b50\u3002<\/p>\n<pre><code class=\"language-cs\">    endpoints.MapControllerRoute(name: &quot;blog&quot;,\n                pattern: &quot;blog\/{*article}&quot;,\n                defaults: new { controller = &quot;Blog&quot;, action = &quot;Article&quot; });\n    endpoints.MapControllerRoute(name: &quot;default&quot;,\n                pattern: &quot;{controller=Home}\/{action=Index}\/{id?}&quot;);<\/code><\/pre>\n<p>\u5728\u4e0a\u8ff0\u4f8b\u5b50\u4e2dUrl\u70ba<code>\/Blog<\/code>\u3001<code>\/Blog\/Article<\/code>\u548c<code>\/Blog\/{any-string}<\/code>\u662f\u552f\u4e00\u7b26\u5408 blog \u8def\u7531\u7684 URL \u8def\u5f91\uff0c\u800c\u4e14\u6703\u5c0d\u61c9\u5230BlogController\u4e0b\u7684Article\u9019\u500bAction\u3002<\/p>\n<pre><code class=\"language-cs\">public class BlogController : Controller\n{\n    public RouteData Article ()\n    {\n        return ControllerContext.RouteData;\n    } \n\n    public RouteData Index ()\n    {\n        return ControllerContext.RouteData;\n    } \n}<\/code><\/pre>\n<table>\n<thead>\n<tr>\n<th>\u6240\u4ee5Url\u8ddf\u7d50\u679c\u6703\u5982\u4e0b\u8868\u6240\u793a\u3002<\/th>\n<th>Url<\/th>\n<th>\u7d50\u679c<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\/Blog\/xxx<\/td>\n<td>{&quot;dataTokens&quot;:{},&quot;routers&quot;:[],&quot;values&quot;:{&quot;controller&quot;:&quot;Blog&quot;,&quot;action&quot;:&quot;Article&quot;,&quot;article&quot;:&quot;xxx&quot;}}<\/td>\n<\/tr>\n<tr>\n<td>\/Blog\/Article<\/td>\n<td>{&quot;dataTokens&quot;:{},&quot;routers&quot;:[],&quot;values&quot;:{&quot;controller&quot;:&quot;Blog&quot;,&quot;action&quot;:&quot;Article&quot;,&quot;article&quot;:&quot;Article&quot;}}<\/td>\n<\/tr>\n<tr>\n<td>\/Blog\/Index<\/td>\n<td>{&quot;dataTokens&quot;:{},&quot;routers&quot;:[],&quot;values&quot;:{&quot;controller&quot;:&quot;Blog&quot;,&quot;action&quot;:&quot;Article&quot;,&quot;article&quot;:&quot;Index&quot;}}<\/td>\n<\/tr>\n<tr>\n<td>\/<\/td>\n<td>Home\u7684Index\u7684\u9801\u9762<\/td>\n<\/tr>\n<tr>\n<td>\/Home<\/td>\n<td>Home\u7684Index\u7684\u9801\u9762<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>WebApi\u8def\u7531\u7684\u8a2d\u5b9a\u5167\u5bb9<\/h4>\n<p>\u6240\u4ee5\u4ecb\u7d39\u5b8c\u4e86Mvc\u7684\u8a2d\u5b9a\u65b9\u5f0f\u5f8c\u63a5\u4e0b\u4f86\u8ddf\u5927\u5bb6\u4ecb\u7d39WebApi\u5728Startup\u600e\u9ebc\u8a2d\u5b9a\u3002<\/p>\n<pre><code class=\"language-cs\">public void Configure(IApplicationBuilder app, \n    IWebHostEnvironment env)\n{\n    .\n    .\n    .\n    app.UseRouting();\n\n    app.UseEndpoints(endpoints =&gt;\n    {\n        endpoints.MapControllers();\n    });\n    .\n    .\n    .\n}<\/code><\/pre>\n<p>\u76f8\u8f03\u65bcMvc\u7684\u8a2d\u5b9a\u4f86\u8aaa\uff0cWebApi\u7684\u8a2d\u5b9a\u7c21\u55ae\u8a31\u591a\uff0c\u56e0\u70ba\u6709\u8a31\u591a\u8a2d\u5b9a\u90fd\u662f\u639b\u5728Controller\u4e0a\u7684Attribute\u4e0a\uff0c\u6240\u4ee5\u6211\u5011\u63a5\u4e0b\u4f86\u8aaa\u660e\u4e00\u4e0bController\u8981\u8a2d\u5b9a\u7684\u5730\u65b9\u3002<\/p>\n<h4>Controller\u8a2d\u5b9a\u7684\u5730\u65b9<\/h4>\n<p>\u525b\u525b\u8aaa\u660e\u5b8c<code>Startup<\/code>\u8981\u8a2d\u5b9a\u7684\u90e8\u5206\u4e4b\u5f8c\uff0c\u63a5\u4e0b\u4f86\u6211\u5011\u8981\u4f86\u770bController\u8a2d\u5b9a\u7684\u5730\u65b9\uff0c\u9019\u90e8\u5206\u53ef\u4ee5\u53c3\u8003\u4e00\u4e0b<a href=\"https:\/\/docs.microsoft.com\/zh-tw\/aspnet\/core\/mvc\/controllers\/routing\" title=\"Mvc Routing\" rel=\"nofollow noopener\" target=\"_blank\">Mvc Routing<\/a>\u7684\u8aaa\u660e\u3002\u95dc\u65bcController\u8a2d\u5b9a\u8def\u7531\u7684\u90e8\u5206\u53ef\u4ee5\u5206\u6210\u5169\u7a2e<code>Attribute<\/code>\u4f86\u8aaa\u660e\uff0c\u9019\u5169\u7a2e\u5206\u5225\u70ba<code>Route<\/code>\u8207<code>HTTP \u52d5\u8a5e<\/code>\uff0c\u56e0\u70ba\u6211\u5011\u5728Startup\u4f7f\u7528\u7684\u662fMapControllers\uff0c\u6240\u4ee5\u5982\u679c\u6c92\u7279\u5225\u8a2d\u5b9a\u7684\u8a71\u9810\u8a2d\u6703\u5148\u4f7f\u7528\u9810\u8a2d\u7684\u8def\u7531\u8a2d\u5b9a<code class=\"kb-btn\">controller=Home}\/{action=Index}\/{id?<\/code>\uff0c\u63a5\u4e0b\u4f86\u5148\u770b\u4e0b\u5217Route\u7684\u7bc4\u4f8b\u3002<\/p>\n<pre><code class=\"language-cs\">[Route(&quot;[controller]\/[action]&quot;)]\npublic class HomeController : Controller\n{\n    [Route(&quot;&quot;)]\n    [Route(&quot;Home&quot;)]\n    [Route(&quot;[controller]\/[action]&quot;)]\n    public IActionResult Index()\n    {\n        return ControllerContext.MyDisplayRouteInfo();\n    }\n\n    [Route(&quot;[controller]\/[action]&quot;)]\n    public IActionResult About()\n    {\n        return ControllerContext.MyDisplayRouteInfo();\n    }\n}<\/code><\/pre>\n<p>\u9996\u5148\u5728<code>[]<\/code>\u5167\u7684\u6703\u5c0d\u61c9\u5230class\u4e0a\u7684<code>controller<\/code>\u8ddf<code>action<\/code>\u4f8b\u5982\u4e0a\u9762\u7684Home\u9019\u500bController\u8ddfIndex\u8ddfAbout\u9019\u500bAction\uff0c\u540c\u6642\u4e5f\u53ef\u4ee5\u7279\u5225\u6307\u5b9a\u5230\u5c0d\u61c9\u7684\u8def\u7531\u4f8b\u5982\u4e0a\u8ff0\u7684<code>[Route(&quot;Home&quot;)]<\/code>\uff0c\u6700\u5f8cclass\u4e0a\u639b\u7684attribute\u6703\u7e7c\u627f\u5230\u65b9\u6cd5\u4e0a\u9762\u6240\u4ee5\u5176\u5be6\u65b9\u6cd5\u4e0a\u7684<code>[Route(&quot;[controller]\/[action]&quot;)]<\/code>\u53ef\u4ee5\u7701\u7565\u3002<br \/>\n\u518d\u4f86\u5728Restful\u4e0a\u9762\u6703\u6307\u5b9aHttpMethod\u6240\u4ee5\u8981\u642d\u914d\u4e0b\u5217attribute\u4f7f\u7528\u8b93Action\u53ea\u80fd\u63a5\u53d7\u7279\u5b9aHttpMethod<\/p>\n<ul>\n<li>HttpGet<\/li>\n<li>HttpPost<\/li>\n<li>HttpPut<\/li>\n<li>HttpDelete<\/li>\n<li>HttpHead<\/li>\n<li>HttpPatch<br \/>\n\u5be6\u969b\u8a2d\u5b9a\u5982\u4e0b\u3002<\/li>\n<\/ul>\n<pre><code class=\"language-cs\">[Route(&quot;api\/[controller]&quot;)]\n[ApiController]\npublic class Test2Controller : ControllerBase\n{\n    [HttpGet]   \/\/ GET \/api\/test2\n    public IActionResult ListProducts()\n    {\n        ...\n    }\n\n    [HttpGet(&quot;{id}&quot;)]   \/\/ GET \/api\/test2\/xyz\n    public IActionResult GetProduct(string id)\n    {\n       ...\n    }\n\n    [HttpGet(&quot;int\/{id:int}&quot;)] \/\/ GET \/api\/test2\/int\/3\n    public IActionResult GetIntProduct(int id)\n    {\n        ...\n    }\n\n    [HttpGet(&quot;int2\/{id}&quot;)]  \/\/ GET \/api\/test2\/int2\/3\n    public IActionResult GetInt2Product(int id)\n    {\n        ...\n    }\n}<\/code><\/pre>\n<p>\u5176\u4e2d\u4e0a\u8ff0\u4f8b\u5b50\u4e2d\u53ef\u4ee5\u770b\u5230<code>[HttpGet(&quot;{id}&quot;)]<\/code>\u9019\u500b\u7684\u8a2d\u5b9a\u5c31\u662f\u540c\u6642\u7d50\u5408HttpMethod\u8ddfRoute\uff0c\u7c21\u55ae\u8aaa\u660e\u5c31\u662f\u7d81\u8a02\u5728HttpGet\u4e26\u4e14url\u70ba<code>\/api\/test2\/xyz<\/code>\u7684\u72c0\u6cc1\u4e0b\u624d\u6703\u4f7f\u7528\u8005\u500bAction\uff0c\u5176\u4e2durl\u7684<code>xyz<\/code>\u662f\u4efb\u610f\u5b57\u4e32\u3002<br \/>\n\u6240\u4ee5\u8def\u7531\u5c31\u4ecb\u7d39\u5230\u9019\u88e1\u544a\u4e00\u6bb5\u843d\u4e86\u3002<\/p>\n<h2>\u5f8c\u8a18<\/h2>\n<p>\u300c\u524d\u8f29\uff0c\u6c92\u60f3\u5230\u5149\u4e00\u500bUrl\u7684\u5c0d\u61c9\u5230\u7a0b\u5f0f\u78bc\u5c31\u6709\u9019\u9ebc\u5927\u7684\u5b78\u554f\u963f\u3002\u300d<br \/>\n\u807d\u5b8c\u4e4b\u5f8c\u5c0f\u5149\u628a\u4ed6\u7684\u611f\u60f3\u544a\u8a34\u5927\u982d\uff0c\u4e26\u4e14\u4e00\u908a\u6284\u5beb\u4ed6\u7684\u7b46\u8a18\u3002<br \/>\n\u300c\u54c8\u54c8\u54c8\uff0c\u4f60\u624d\u77e5\u9053\u963f\uff0c\u4e0d\u904e\u9019\u908a\u8981\u6ce8\u610f\u7684\u662f\u907f\u514d\u5beb\u51fa\u6a21\u51cc\u5169\u53ef\u7684\u8def\u7531\u5594\uff0c\u597d\u4e00\u9ede\u5728\u958b\u767c\u6642\u6703\u544a\u8a34\u4f60\u6a21\u51cc\u5169\u53ef\uff0c\u5982\u679c\u5beb\u5f97\u4e0d\u597d\u4f60\u6703\u8d70\u5230\u4e0d\u662f\u4f60\u60f3\u8981\u7684Action\u5594\u3002\u300d<br \/>\n\u6240\u4ee5\u4eca\u5929\u5c31\u5728\u5927\u982d\u7684\u53ee\u5680\u4e0b\u7d50\u675f\u4e86\u8def\u7531\u7684\u8ab2\u7a0b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8def\u7531\u7684\u4ecb\u7d39 \u5728\u6b77\u7d93\u6628\u5929\u7db2\u9801\u7a0b\u5f0f\u7684\u57fa\u790e\u77e5\u8b58\u7684\u4ecb\u7d39\u4e4b\u5f8c\uff0c\u4eca\u5929\u5c0f\u5149\u7d42\u65bc\u8981\u958b\u59cb\u9032\u5165\u7db2\u9801\u7a0b\u5f0f\u7684\u958b\u767c\u4e86\uff0c\u6240\u4ee5\u4eca\u5929\u5c0f\u5149\u6703\u5b78\u5230 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.develop-note.com\/blog\/2021\/09\/28\/routing\/\" class=\"more-link\">\u95b1\u8b80\u5168\u6587<span class=\"screen-reader-text\">\u3008D-17 \u8def\u7531 ? Routing\u3009<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[2],"tags":[90,92,112],"class_list":["post-2245","post","type-post","status-publish","format-standard","hentry","category-develop","tag-2021ironman","tag-dotnetcore","tag-routing"],"_links":{"self":[{"href":"https:\/\/www.develop-note.com\/blog\/wp-json\/wp\/v2\/posts\/2245","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.develop-note.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.develop-note.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.develop-note.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.develop-note.com\/blog\/wp-json\/wp\/v2\/comments?post=2245"}],"version-history":[{"count":21,"href":"https:\/\/www.develop-note.com\/blog\/wp-json\/wp\/v2\/posts\/2245\/revisions"}],"predecessor-version":[{"id":2940,"href":"https:\/\/www.develop-note.com\/blog\/wp-json\/wp\/v2\/posts\/2245\/revisions\/2940"}],"wp:attachment":[{"href":"https:\/\/www.develop-note.com\/blog\/wp-json\/wp\/v2\/media?parent=2245"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.develop-note.com\/blog\/wp-json\/wp\/v2\/categories?post=2245"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.develop-note.com\/blog\/wp-json\/wp\/v2\/tags?post=2245"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}