Initializing an Instance of OBSClient
Each time you want to send an HTTP/HTTPS request to OBS, you must create an instance of OBSClient. Sample code is as follows:
1 2 3 4 5 6 7 | OBSStaticCredentialProvider *credentialProvider = [[OBSStaticCredentialProvider alloc] initWithAccessKey:@"*** Provide your Access Key ***" secretKey:@"*** Provide your Secret Key ***"];
OBSServiceConfiguration *conf = [[OBSServiceConfiguration alloc] initWithURLString:@"https://your-endpoint" credentialProvider:credentialProvider];
// Initialize an instance of OBSClient.
OBSClient *client = [[OBSClient alloc] initWithConfiguration:conf];
}
|
For more information, see chapter "Initialization."
Last Article: Obtaining Endpoints
Next Article: Creating a Bucket
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.