HttpRequestOptions.cs 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. using System;
  2. using System.Threading;
  3. namespace MediaBrowser.Common.Net
  4. {
  5. /// <summary>
  6. /// Class HttpRequestOptions
  7. /// </summary>
  8. public class HttpRequestOptions
  9. {
  10. /// <summary>
  11. /// Gets or sets the URL.
  12. /// </summary>
  13. /// <value>The URL.</value>
  14. public string Url { get; set; }
  15. /// <summary>
  16. /// Gets or sets the accept header.
  17. /// </summary>
  18. /// <value>The accept header.</value>
  19. public string AcceptHeader { get; set; }
  20. /// <summary>
  21. /// Gets or sets the cancellation token.
  22. /// </summary>
  23. /// <value>The cancellation token.</value>
  24. public CancellationToken CancellationToken { get; set; }
  25. /// <summary>
  26. /// Gets or sets the resource pool.
  27. /// </summary>
  28. /// <value>The resource pool.</value>
  29. public SemaphoreSlim ResourcePool { get; set; }
  30. /// <summary>
  31. /// Gets or sets the user agent.
  32. /// </summary>
  33. /// <value>The user agent.</value>
  34. public string UserAgent { get; set; }
  35. /// <summary>
  36. /// Gets or sets the progress.
  37. /// </summary>
  38. /// <value>The progress.</value>
  39. public IProgress<double> Progress { get; set; }
  40. /// <summary>
  41. /// Gets or sets a value indicating whether [enable HTTP compression].
  42. /// </summary>
  43. /// <value><c>true</c> if [enable HTTP compression]; otherwise, <c>false</c>.</value>
  44. public bool EnableHttpCompression { get; set; }
  45. /// <summary>
  46. /// Initializes a new instance of the <see cref="HttpRequestOptions"/> class.
  47. /// </summary>
  48. public HttpRequestOptions()
  49. {
  50. EnableHttpCompression = true;
  51. }
  52. }
  53. }