SDK Common Response Headers
After you call an API related to the OBSClient class, an instance or a sub-class instance of the OBSBaseResponse class will be returned. This class contains information about HTTP/HTTPS response headers.
The following sample code shows how to process the common headers:
static OBSClient *client;
NSString *endPoint = @"your-endpoint";
NSString *SK = @"*** Provide your Secret Key ***";
NSString *AK = @"*** Provide your Access Key ***";
// Initialize identity authentication.
OBSStaticCredentialProvider *credentialProvider = [[OBSStaticCredentialProvider alloc] initWithAccessKey:AK secretKey:SK];
//Initialize service configuration.
OBSServiceConfiguration *conf = [[OBSServiceConfiguration alloc] initWithURLString:endPoint credentialProvider:credentialProvider];
// Initialize an instance of OBSClient.
client = [[OBSClient alloc] initWithConfiguration:conf];
// Initiate a request.
OBSListBucketsRequest *request = [OBSListBucketsRequest new];
[client listBuckets:request completionHandler:^(OBSListBucketsResponse *response, NSError *error) {
NSLog(@"%@",response.headers);
}]; Last Article: SDK Custom Exceptions
Next Article: Log Analysis
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.