PutObjectResponseDeserializer.cs 767 B

123456789101112131415161718192021222324252627
  1. /*
  2. * Copyright (C) Alibaba Cloud Computing
  3. * All rights reserved.
  4. *
  5. * 版权所有 (C)阿里云计算有限公司
  6. */
  7. using Aliyun.OSS.Common.Communication;
  8. using Aliyun.OSS.Util;
  9. namespace Aliyun.OSS.Transform
  10. {
  11. internal class PutObjectResponseDeserializer : ResponseDeserializer<PutObjectResult, PutObjectResult>
  12. {
  13. public PutObjectResponseDeserializer()
  14. : base(null)
  15. { }
  16. public override PutObjectResult Deserialize(ServiceResponse xmlStream)
  17. {
  18. var result = new PutObjectResult();
  19. if (xmlStream.Headers.ContainsKey(HttpHeaders.ETag))
  20. result.ETag = OssUtils.TrimQuotes(xmlStream.Headers[HttpHeaders.ETag]);
  21. return result;
  22. }
  23. }
  24. }