QCloudGetBucketWebsiteRequest Class Reference

Inherits from QCloudBizHTTPRequest
Declared in QCloudGetBucketWebsiteRequest.h
QCloudGetBucketWebsiteRequest.m

Overview

用于获取与存储桶关联的静态网站配置信息

功能说明

GET Bucket website 请求用于获取与存储桶关联的静态网站配置信息。

关于为存储桶配置静态网站接口的具体描述,请查看https://cloud.tencent.com/document/product/436/31930.

示例

@code

QCloudGetBucketWebsiteRequest *getReq = [QCloudGetBucketWebsiteRequest new];

// 存储桶名称,格式为 BucketName-APPID
getReq.bucket = @"examplebucket-1250000000";
[getReq setFinishBlock:^(QCloudWebsiteConfiguration *  result,
                         NSError * error) {

    // 设置重定向规则,最多设置100条RoutingRule
    QCloudWebsiteRoutingRules *rules =result.rules;

    // 索引文档
    QCloudWebsiteIndexDocument *indexDocument = result.indexDocument;

    // 错误文档
    QCloudWebisteErrorDocument *errorDocument = result.errorDocument;

    // 重定向所有请求
    QCloudWebsiteRedirectAllRequestsTo *redirectAllRequestsTo = result.redirectAllRequestsTo;

}];
[[QCloudCOSXMLService defaultCOSXML] GetBucketWebsite:getReq];

  bucket

存储桶名

@property (strong, nonatomic) NSString *bucket

Declared In

QCloudGetBucketWebsiteRequest.h