tencent cloud

All product documents
Cloud Object Storage
Setting Custom Headers
Last updated: 2024-01-23 17:15:08
Setting Custom Headers
Last updated: 2024-01-23 17:15:08

Overview

This document describes how to include custom headers in a request using the SDK.

SDK API Reference

For the parameters and method descriptions of all the APIs in the SDK, please see SDK API Reference.

Description

COS allows object upload requests to include custom headers that specify user-defined metadata. These headers start with x-cos-meta-, end with a custom suffix, and are saved as part of the object metadata.
If you have activated the Tencent Cloud CI service, you can specify the Pic-Operations header to enable automatic image processing. For detailed API instructions, see Persistence Processing.

Sample code

Objective-C
request.customHeaders[@"custom-key"] = @"custom-value";
Note:
For the complete sample, go to GitHub.
Swift
request.customHeaders["custom-key"] = "custom-value";
Note:
For the complete sample, go to GitHub.
Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

7x24 Phone Support
Hong Kong, China
+852 800 906 020 (Toll Free)
United States
+1 844 606 0804 (Toll Free)
United Kingdom
+44 808 196 4551 (Toll Free)
Canada
+1 888 605 7930 (Toll Free)
Australia
+61 1300 986 386 (Toll Free)
EdgeOne hotline
+852 300 80699
More local hotlines coming soon