2
0

HttpResponseInfo.cs 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. using System;
  2. using System.IO;
  3. using System.Net;
  4. using System.Net.Http.Headers;
  5. namespace MediaBrowser.Common.Net
  6. {
  7. /// <summary>
  8. /// Class HttpResponseInfo.
  9. /// </summary>
  10. public sealed class HttpResponseInfo : IDisposable
  11. {
  12. #pragma warning disable CS1591
  13. public HttpResponseInfo()
  14. {
  15. }
  16. public HttpResponseInfo(HttpResponseHeaders headers, HttpContentHeaders contentHeader)
  17. {
  18. Headers = headers;
  19. ContentHeaders = contentHeader;
  20. }
  21. #pragma warning restore CS1591
  22. /// <summary>
  23. /// Gets or sets the type of the content.
  24. /// </summary>
  25. /// <value>The type of the content.</value>
  26. public string ContentType { get; set; }
  27. /// <summary>
  28. /// Gets or sets the response URL.
  29. /// </summary>
  30. /// <value>The response URL.</value>
  31. public string ResponseUrl { get; set; }
  32. /// <summary>
  33. /// Gets or sets the content.
  34. /// </summary>
  35. /// <value>The content.</value>
  36. public Stream Content { get; set; }
  37. /// <summary>
  38. /// Gets or sets the status code.
  39. /// </summary>
  40. /// <value>The status code.</value>
  41. public HttpStatusCode StatusCode { get; set; }
  42. /// <summary>
  43. /// Gets or sets the temp file path.
  44. /// </summary>
  45. /// <value>The temp file path.</value>
  46. public string TempFilePath { get; set; }
  47. /// <summary>
  48. /// Gets or sets the length of the content.
  49. /// </summary>
  50. /// <value>The length of the content.</value>
  51. public long? ContentLength { get; set; }
  52. /// <summary>
  53. /// Gets or sets the headers.
  54. /// </summary>
  55. /// <value>The headers.</value>
  56. public HttpResponseHeaders Headers { get; set; }
  57. /// <summary>
  58. /// Gets or sets the content headers.
  59. /// </summary>
  60. /// <value>The content headers.</value>
  61. public HttpContentHeaders ContentHeaders { get; set; }
  62. /// <inheritdoc />
  63. public void Dispose()
  64. {
  65. // backwards compatibility
  66. }
  67. }
  68. }