public class PutBucketRefererRequest extends BucketRequest
CosXmlRequest.OnRequestWeightListener
bucket, noSignHeaders, noSignParams, priority, qCloudTaskStateListener, queryParameters, region, requestHeaders, requestURL, signSourceProvider
构造器和说明 |
---|
PutBucketRefererRequest(java.lang.String bucket,
boolean enabled,
RefererConfiguration.RefererType refererType) |
限定符和类型 | 方法和说明 |
---|---|
void |
checkParameters()
sdk 参数校验
|
java.lang.String |
getMethod()
获取HTTP请求方法
RequestMethod |
java.util.Map<java.lang.String,java.lang.String> |
getQueryString()
获取url query集合
|
RequestBodySerializer |
getRequestBody()
获取请求体
|
boolean |
isNeedMD5()
针对有请求体的 PUT 和 POST 请求,此头部是必选项。
|
void |
setAllowEmptyRefer(boolean allowEmptyRefer)
设置是否允许空 Referer 访问
|
void |
setDomainList(java.util.List<RefererConfiguration.Domain> domains)
设置域名列表
|
void |
setEnabled(boolean enabled)
设置是否开启防盗链
|
void |
setRefererType(RefererConfiguration.RefererType refererType)
设置防盗链类型(黑名单、白名单)
|
getPath
addHeader, addNoSignHeader, addNoSignParams, addQuery, attachMetrics, getBucket, getHttpTask, getKeyTime, getMetrics, getNoSignHeaders, getNoSignParams, getPriority, getQueryEncodedString, getRegion, getRequestHeaders, getRequestHost, getRequestURL, getSignSourceProvider, getSTSCredentialScope, getWeight, headersHasUnsafeNonAscii, isSignInUrl, isSupportAccelerate, isSupportAccelerate, setNeedMD5, setOnRequestWeightListener, setQueryEncodedString, setQueryParameters, setRegion, setRequestHeaders, setRequestHeaders, setRequestHeaders, setRequestURL, setSign, setSign, setSign, setSign, setSign, setSignInUrl, setSignKeyTime, setSignParamsAndHeaders, setSignSourceProvider, setTask, setTaskStateListener, xmlBuilder
public PutBucketRefererRequest(java.lang.String bucket, boolean enabled, RefererConfiguration.RefererType refererType)
public void setEnabled(boolean enabled)
enabled
- 是否开启public void setRefererType(@NonNull RefererConfiguration.RefererType refererType)
refererType
- 防盗链类型public void setAllowEmptyRefer(boolean allowEmptyRefer)
allowEmptyRefer
- 是否允许public void setDomainList(@NonNull java.util.List<RefererConfiguration.Domain> domains)
domains
- 域名列表public java.lang.String getMethod()
CosXmlRequest
RequestMethod
getMethod
在类中 CosXmlRequest
public java.util.Map<java.lang.String,java.lang.String> getQueryString()
CosXmlRequest
getQueryString
在类中 CosXmlRequest
public RequestBodySerializer getRequestBody() throws CosXmlClientException
CosXmlRequest
getRequestBody
在类中 CosXmlRequest
CosXmlClientException
- 客户异常public void checkParameters() throws CosXmlClientException
CosXmlRequest
checkParameters
在类中 BucketRequest
CosXmlClientException
- cosXmlClientExceptionpublic boolean isNeedMD5()
CosXmlRequest
isNeedMD5
在类中 CosXmlRequest