Change the HttpAbstractions so that the caller can provide its own HttpClient instead of creating parameters for every HttpClient Option

This commit is contained in:
runebaas 2020-07-28 22:14:22 +02:00
parent 4659f793f5
commit 913b4a5f10
No known key found for this signature in database
GPG key ID: 2677AF508D0300D6
2 changed files with 21 additions and 26 deletions

View file

@ -28,13 +28,7 @@ namespace Geekbot.net.Commands.Utils.Changelog
{
try
{
var commits = await HttpAbstractions.Get<List<CommitDto>>(
new Uri("https://api.github.com/repos/pizzaandcoffee/geekbot.net/commits"),
new Dictionary<string, string>()
{
{ "User-Agent", "http://developer.github.com/v3/#user-agent-required" }
}
);
var commits = await HttpAbstractions.Get<List<CommitDto>>(new Uri("https://api.github.com/repos/pizzaandcoffee/geekbot.net/commits"));
var eb = new EmbedBuilder();
eb.WithColor(new Color(143, 165, 102));