ImageProcessRequest.cs 736 B

12345678910111213141516171819202122232425262728
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using COSXML.Common;
  5. using COSXML.Model.Object;
  6. using COSXML.CosException;
  7. namespace COSXML.Model.CI
  8. {
  9. public sealed class ImageProcessRequest : ObjectRequest
  10. {
  11. public ImageProcessRequest(string bucket, string key, string operationRules)
  12. : base(bucket, key)
  13. {
  14. if (operationRules == null)
  15. {
  16. throw new CosClientException((int)CosClientError.InvalidArgument, "operationRules = null");
  17. }
  18. this.method = CosRequestMethod.POST;
  19. this.queryParameters.Add("image_process", null);
  20. this.headers.Add("Pic-Operations", operationRules);
  21. }
  22. }
  23. }