BaseClient.cs 556 B

12345678910111213141516171819202122232425
  1. using System;
  2. using System.Net.Http;
  3. namespace MediaBrowser.ApiInteraction
  4. {
  5. /// <summary>
  6. /// Provides a base class used by the api and image services
  7. /// </summary>
  8. public abstract class BaseClient : IDisposable
  9. {
  10. public string ApiUrl { get; set; }
  11. protected HttpClient HttpClient { get; private set; }
  12. public BaseClient()
  13. {
  14. HttpClient = new HttpClient();
  15. }
  16. public void Dispose()
  17. {
  18. HttpClient.Dispose();
  19. }
  20. }
  21. }