Response.cs 818 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using System.IO;
  5. namespace COSXML.Network
  6. {
  7. public class Response
  8. {
  9. public int Code { get; set; }
  10. public string Message { get; set; }
  11. public Dictionary<string, List<string>> Headers { get; set; }
  12. public long ContentLength { get; set; }
  13. public string ContentType { get; set; }
  14. public ResponseBody Body { get; set; }
  15. public virtual void HandleResponseHeader()
  16. {
  17. }
  18. /// <summary>
  19. /// handle body successfully or throw exception
  20. /// </summary>
  21. /// <param name="ex"></param>
  22. /// <param name="isSuccess"></param>
  23. public virtual void OnFinish(bool isSuccess, Exception ex)
  24. {
  25. }
  26. }
  27. }