# Powers.EzHttpClient **Repository Path**: DonPangPang/Powers.EzHttpClient ## Basic Information - **Project Name**: Powers.EzHttpClient - **Description**: HttpClientWrapper - **Primary Language**: C# - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2022-04-02 - **Last Updated**: 2022-05-27 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Powers.EzHttpClient 提供了对HttpClient的封装, 以及常用的`get`,`post`,`put`,`delete`方法. get: ```csharp var res = await HttpClientWrapper .Create() .Url("http://localhost:5299/WeatherForecast") .Authentication("Bearer", token) .GetAsync>(); ``` post: ```csharp var res = await HttpClientWrapper .Create() .Url("http://localhost:5299/WeatherForecast") .Authentication("Bearer", token) .Body(new { }) .PostAsync(); ``` put: ```csharp var res = await HttpClientWrapper .Create() .Url("http://localhost:5299/WeatherForecast") .Authentication("Bearer", token) .Body(new { }) .PutAsync(); ``` delete: ```csharp var res = await HttpClientWrapper .Create() .Url("http://localhost:5299/WeatherForecast") .Authentication("Bearer", token) .DeleteAsync(); ```