{"id":642,"date":"2019-09-25T16:46:40","date_gmt":"2019-09-25T07:46:40","guid":{"rendered":"http:\/\/csharp.ihavenomoney.co.kr\/?p=642"},"modified":"2019-09-25T16:46:40","modified_gmt":"2019-09-25T07:46:40","slug":"middleware-4","status":"publish","type":"post","link":"https:\/\/csharp.ihavenomoney.co.kr\/?p=642","title":{"rendered":"middleware-4"},"content":{"rendered":"\n<pre class=\"lang:c# decode:true \" >using Microsoft.AspNetCore.Hosting; \/\/IWebHostBuilder\r\nusing Microsoft.AspNetCore.Builder; \/\/IApplicationBuilder\r\nusing Microsoft.AspNetCore.Http; \/\/WriteAsync\r\nusing Microsoft.AspNetCore; \/\/webHost\r\n\r\nnamespace WebApplication1\r\n{\r\n        public class Startup\r\n        {\r\n            public void Configure(IApplicationBuilder app)\r\n            {\r\n                app.Map(\"\/hello\", (IApplicationBuilder pp) =&gt; pp.Run(context =&gt; context.Response.WriteAsync(\"\/hello path\")));\r\n                app.Map(\"\/world\", (IApplicationBuilder pp) =&gt; pp.Run(context =&gt; context.Response.WriteAsync(\"\/world path\")));\r\n\r\n                app.Run(context =&gt;\r\n                {\r\n                    context.Response.Headers.Add(\"content-type\", \"text\/html\");\r\n                    return context.Response.WriteAsync(@\"\r\n                       &lt;a href=\"\"\/hello\"\"&gt;hello&lt;\/a&gt; &lt;a href=\"\"\/world\"\"&gt;world&lt;\/a&gt;\r\n                    \");\r\n                });\r\n            }\r\n        }\r\n\r\n        public class Program\r\n        {\r\n            public static void Main(string[] args)\r\n            {\r\n                CreateWebHostBuilder(args).Build().Run();\r\n            }\r\n\r\n            public static IWebHostBuilder CreateWebHostBuilder(string[] args) =&gt;\r\n                WebHost.CreateDefaultBuilder(args)\r\n                    .UseStartup&lt;Startup&gt;()\r\n                    .UseEnvironment(\"Development\");\r\n        }\r\n}<\/pre>\n<p>\uacb0\uacfc : \/hello path<\/p>\n","protected":false},"excerpt":{"rendered":"<p>using Microsoft.AspNetCore.Hosting; \/\/IWebHostBuilder using Microsoft.AspNetCore.Builder; \/\/IApplicationBuilder using Microsoft.AspNetCore.Http; \/\/WriteAsync using Microsoft.AspNetCore; \/\/webHost namespace WebApplication1 { public class Startup { public void Configure(IApplicationBuilder app) { app.Map(&#8220;\/hello&#8221;, (IApplicationBuilder pp) =&gt; pp.Run(context =&gt; context.Response.WriteAsync(&#8220;\/hello path&#8221;))); app.Map(&#8220;\/world&#8221;, (IApplicationBuilder pp) =&gt; pp.Run(context =&gt; context.Response.WriteAsync(&#8220;\/world path&#8221;))); app.Run(context =&gt; { context.Response.Headers.Add(&#8220;content-type&#8221;, &#8220;text\/html&#8221;); return context.Response.WriteAsync(@&#8221; &lt;a href=&#8221;&#8221;\/hello&#8221;&#8221;&gt;hello&lt;\/a&gt; &lt;a href=&#8221;&#8221;\/world&#8221;&#8221;&gt;world&lt;\/a&gt; &#8220;); }); } }\u2026 <span class=\"read-more\"><a href=\"https:\/\/csharp.ihavenomoney.co.kr\/?p=642\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[108],"tags":[],"class_list":["post-642","post","type-post","status-publish","format-standard","hentry","category-net-core"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/csharp.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/642","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/csharp.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/csharp.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/csharp.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/csharp.ihavenomoney.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=642"}],"version-history":[{"count":1,"href":"https:\/\/csharp.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/642\/revisions"}],"predecessor-version":[{"id":643,"href":"https:\/\/csharp.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/642\/revisions\/643"}],"wp:attachment":[{"href":"https:\/\/csharp.ihavenomoney.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=642"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/csharp.ihavenomoney.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=642"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/csharp.ihavenomoney.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=642"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}