- Hands-On Full:Stack Web Development with ASP.NET Core
- Tamir Dresher Amir Zuker Shay Friedman
- 122字
- 2021-06-10 19:37:31
Generating a response of different types
So far, all the of action methods we have created returned simple response types, such as string or arrays, but the HTTP standard has no concept of method signature and return type. Instead, it defines the format of a valid HTTP response. This is how a simple HTTP response might look:

As you can see, the HTTP response includes Status Code, Headers, and Body. Each of these parts allows you to communicate pieces of information to the client, and ASP.NET Core provides the glue that converts the results of your action methods into those parts of the HTTP response, regardless of whether they are executed successfully, or completed with a failure.
推薦閱讀
- 物聯(lián)網(wǎng)與北斗應用
- Twilio Cookbook
- TCP/IP入門經(jīng)典(第5版)
- Hands-On Full Stack Development with Spring Boot 2 and React(Second Edition)
- SSL VPN : Understanding, evaluating and planning secure, web/based remote access
- 物聯(lián)網(wǎng)與無線傳感器網(wǎng)絡(luò)
- Mastering Dart
- jQuery Mobile Web Development Essentials
- Learning Storm
- 5G時代的大數(shù)據(jù)技術(shù)架構(gòu)和關(guān)鍵技術(shù)詳解
- 物聯(lián)網(wǎng)基礎(chǔ)及應用
- SEO攻略:搜索引擎優(yōu)化策略與實戰(zhàn)案例詳解
- 趣話通信:6G的前世、今生和未來
- 學術(shù)虛擬社區(qū)用戶社會化交互行為研究
- 網(wǎng)絡(luò)分析技術(shù)揭秘:原理、實踐與WinPcap深入解析