public static async Task <T> GetAsync <T>(this FeedlySharpHttpClient client, string url, ILogger logger) { logger.LogDebug($"[{nameof(FeedlySharpHttpClient)} - {nameof(GetAsync)}]: Calling {url}"); var request = new RestRequest(url, DataFormat.Json); var response = await client.ExecuteGetAsync <T>(request); response.ThrowIfNotSuccess(logger, url); return(response.Data); }
public void Should_create_instance_of_client_using_IConfiguration() { var feedlySharp = new FeedlySharpHttpClient(Mocks.MockFeedlyIConfiguration); Assert.NotNull(feedlySharp); }