以 Visual C++ 進行雲端和 Web 程式設計Cloud and Web Programming in Visual C++

在 C++ 中,您有數個選項可以連接到 Web 和雲端。In C++, you have several options for connecting to the web and the cloud.

Microsoft Azure SDK 與 REST 服務Microsoft Azure SDKs and REST services

  • Microsoft Azure Storage Client Library for C++ (英文)Microsoft Azure Storage Client Library for C++

    「適用於 C++ 的 Azure 儲存體用戶端程式庫」提供一個可搭配 Azure 儲存體運作的全方位的 API,其中包括但不限於下列功能:The Azure Storage Client Library for C++ provides a comprehensive API for working with Azure storage, including but not limited to the following abilities:

    • 建立、讀取、刪除及列出 Blob 容器、資料表和佇列。Create, read, delete, and list blob containers, tables, and queues.
    • 建立、讀取、刪除、列出及複製 Blob,再加上讀取和寫入 Blob 範圍。Create, read, delete, list and copy blobs plus read and write blob ranges.
    • 插入、刪除、取代、合併及查詢 Azure 資料表中的實體。Insert, delete, replace, merge, and query entities in an Azure table.
    • 將訊息在 Azure 佇列中加入佇列和清除佇列。Enqueue and dequeue messages in an Azure queue.
    • 延遲列出容器、Blob、資料表和佇列,以及延遲查詢實體Lazily list containers, blobs, tables, and queues, and lazily query entities
  • 適用於物聯網的 ANSI C99 Azure IoT 中樞 SDK 可讓 IoT 應用程式在裝置或後端上執行。The ANSI C99 Azure IoT Hub SDKs for Internet of Things enable IoT applications to run on the device or on the backend.

  • Microsoft Graph 中的 OneDrive 與 SharePointOneDrive and SharePoint in Microsoft Graph

    OneDrive API 提供一組 HTTP 服務,可將您的應用程式連接到 Microsoft 365 和 SharePoint Server 2016 中的檔案和資料夾。The OneDrive API provides a set of HTTP services to connect your application to files and folders in Microsoft 365 and SharePoint Server 2016.

Windows 與跨平台網路 APIWindows and cross-platform networking APIs

  • C++ REST SDK (代號 "Casablanca")C++ REST SDK (Code name "Casablanca")

    提供一個新式、跨平台的非同步 API 來與 REST 服務進行互動。Provides a modern, cross-platform, asynchronous API for interacting with REST services.

    • 具有適用於 JSON 文件剖析和序列化的內建支援,可對任何 HTTP 伺服器執行 REST 呼叫Perform REST calls against any HTTP server, with built-in support for JSON document parsing and serialization
    • 支援 OAuth 1 和 2,包括本機重新導向接聽程式Supports OAuth 1 and 2, including a local redirect listener
    • 對遠端服務進行 WebSocket 連線Make WebSockets connections against remote services
    • 以 PPL 為基礎的完全非同步工作 API,包括內建的執行緒集區A fully asynchronous task API based on PPL, including a built-in thread pool

    支援 Windows Desktop (7+)、Windows Server (2012+)、通用 Windows 平台、Linux、OSX、Android 及 iOS。Supports Windows Desktop (7+), Windows Server (2012+), Universal Windows Platform, Linux, OSX, Android, and iOS.

  • Windows::Web::Http::HttpClientWindows::Web::Http::HttpClient

    Windows 執行階段 HTTP 用戶端類別會在 System.Web 命名空間中相同名稱的 .NET Framework 類別上建立模型。A Windows Runtime HTTP client class modeled on the .NET Framework class of the same name in the System.Web namespace. HttpClient 完全支援透過 HTTP 的非同步上傳和下載,以及可讓自訂 HTTP 處理常式插入管線的管線篩選器。HttpClient fully supports asynchronous upload and download over HTTP, and pipeline filters that enable the insertion of custom HTTP handlers into the pipeline. Windows SDK 包含計量網路、OAuth 驗證等等的範例篩選條件。The Windows SDK includes sample filters for metered networks, OAuth authentication, and more. 針對只以「通用 Windows 平台」為目標的應用程式,建議您使用 Windows::Web:HttpClient 類別。For apps that target only Universal Windows Platform, we recommend that you use the Windows::Web:HttpClient class.

  • IXMLHTTPRequest2 介面IXMLHTTPRequest2 interface

    提供一個原生 COM 介面,可供您在「Windows 執行階段」應用程式或 Windows 傳統型應用程式中使用,以透過 HTTP 連線至網際網路及發出 GET、PUT 和其他 HTTP 命令。Provides a native COM interface that you can use in Windows Runtime apps or Windows desktop apps to connect to the Internet over HTTP and issue GET, PUT, and other HTTP commands. 如需詳細資訊,請參閱 逐步解說:使用工作和 XML HTTP 要求進行連接For more information, see Walkthrough: Connecting Using Tasks and XML HTTP Requests.

  • Windows 網際網路 (WinInet)Windows Internet (WinInet)

    您可以在 Windows 桌面應用程式中使用,以便連接到網際網路的 Windows 應用程式開發介面。Windows API that you can use in Windows desktop apps to connect to the Internet.

請參閱See also

Visual Studio 中的 C++C++ in Visual Studio
Microsoft Azure C 和 C++ 開發人員中心Microsoft Azure C and C++ Developer Center
網路和 Web 服務 (UWP)Networks and web services (UWP)