Skip to content

Commit 097a35c

Browse files
committed
Set useragent to mabako/Git.hub
1 parent bf75eaf commit 097a35c

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

Git.hub/Client.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,13 @@ namespace Git.hub
99
/// </summary>
1010
public class Client
1111
{
12-
private RestClient client = new RestClient("https://api.github.com");
12+
private RestClient client;
13+
14+
public Client()
15+
{
16+
client = new RestClient("https://api.github.com");
17+
client.UserAgent = "mabako/Git.hub";
18+
}
1319

1420
/// <summary>
1521
/// Sets the client to use username and password with GitHub

Git.hub/OAuth2Helper.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ public static string requestToken(string client_id, string client_secret, string
2828
{
2929
// Not on api.github.com
3030
var client = new RestClient("https://github.com");
31+
client.UserAgent = "mabako/Git.hub";
3132

3233
var request = new RestRequest("/login/oauth/access_token");
3334
request.RequestFormat = DataFormat.Json;

0 commit comments

Comments
 (0)