Your First ASP.NET Web API (C#) 第一個ASP.NET Web API(C#) By Mike Wasson|January 21, 2012 作者:Mike Wasson | 日期:2012-1-21 本文引自: HTTP is not just for serving up web pages. It is also a powerful platform for building APIs that expo
Your First ASP.NET Web API (C#)
第一個ASP.NET Web API(C#)
By Mike Wasson|January 21, 2012
作者:Mike Wasson | 日期:2012-1-21
本文引自:
HTTP is not just for serving up web pages. It is also a powerful platform for building APIs that expose services and data. HTTP is simple, flexible, and ubiquitous. Almost any platform that you can think of has an HTTP library, so HTTP services can reach a broad range of clients, including browsers, mobile devices, and traditional desktop applications.
HTTP不僅服務于web頁面。它也是建立暴露服務與數據的API(應用程序編程接口)的功能強大的平臺。HTTP簡單、靈活且無處不在。幾乎你所能想到的任何平臺都有一個HTTP庫,因此,HTTP服務能夠到達范圍廣泛的客戶端,虛擬主機,包括瀏覽器、移動設備、以及傳統的桌面應用程序。
ASP.NET Web API is a framework for building web APIs on top of the .NET Framework. In this tutorial, you will use ASP.NET Web API to create a web API that returns a list of products. The front-end web page uses jQuery to display the results.
ASP.NET Web API是一個用來在.NET框架上建立web API的框架。在本教程中,香港服務器租用,你將運用ASP.NET Web API來創建一個返回產品列表的web API。前端web頁面使用jQuery來顯示其結果(如圖1所示)。
圖1. 應用程序的web頁面
,香港虛擬主機