# WebAsync **Repository Path**: Hont/web-async ## Basic Information - **Project Name**: WebAsync - **Description**: c#异步网络请求简化小工具 - **Primary Language**: C# - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-12-10 - **Last Updated**: 2022-05-24 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # WebAsync #### 介绍 异步网络请求简化小工具,替代关键字的协程异步而非C#异步 (https://www.cnblogs.com/hont/p/15666596.html) ``` async Task Exec() { using var r1 = await WebAsync.From(UnityWebRequest.Get("https://www.baidu.com")); using var r2 = await WebAsync.From(UnityWebRequest.Get("https://www.youku.com")); Debug.Log("web content:" + r1.GetString()); Debug.Log("downloaded image: " + r2.GetTexture()); } _ = Exec(); ```