We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3a51211 + d94fdfb commit be043c2Copy full SHA for be043c2
Git.hub/Client.cs
@@ -1,6 +1,7 @@
1
using System;
2
using System.Collections.Generic;
3
using System.Linq;
4
+using System.Threading.Tasks;
5
using RestSharp;
6
using RestSharp.Authenticators;
7
@@ -148,7 +149,7 @@ public User getCurrentUser()
148
149
return user.Data;
150
}
151
- public User GetUser(string userName)
152
+ public async Task<User> GetUserAsync(string userName)
153
{
154
if (string.IsNullOrEmpty(userName))
155
@@ -157,7 +158,7 @@ public User GetUser(string userName)
157
158
159
var request = new RestRequest($"/users/{userName}");
160
- var user = client.Get<User>(request);
161
+ var user = await client.ExecuteGetTaskAsync<User>(request);
162
163
164
0 commit comments