public class GenericRequest extends Object
Modifier and Type | Field and Description |
---|---|
protected String |
bucketName |
protected HttpMethodEnum |
httpMethod |
protected HashMap<String,String> |
userHeaders |
Constructor and Description |
---|
GenericRequest() |
GenericRequest(String bucketName) |
Modifier and Type | Method and Description |
---|---|
void |
addUserHeaders(String key,
String value) |
String |
getBucketName()
Obtain the bucket name.
|
HttpMethodEnum |
getHttpMethod() |
HashMap<String,String> |
getUserHeaders() |
boolean |
isRequesterPays()
If the requester is allowed to pay, true is returned.
|
void |
setBucketName(String bucketName)
Set the bucket name.
|
void |
setRequesterPays(boolean isRequesterPays)
Used to configure whether to enable the requester-pays function.
|
void |
setUserHeaders(HashMap<String,String> userHeaders) |
String |
toString() |
protected String bucketName
protected HttpMethodEnum httpMethod
public GenericRequest()
public GenericRequest(String bucketName)
public HttpMethodEnum getHttpMethod()
public void setBucketName(String bucketName)
bucketName
- Bucket namepublic String getBucketName()
public boolean isRequesterPays()
If the requester-pays function is enabled for a bucket, this attribute must be set to true when the bucket is requested by a requester other than the bucket owner. Otherwise, status code 403 is returned.
After the requester-pays function is enabled, anonymous access to the bucket is not allowed.
public void setRequesterPays(boolean isRequesterPays)
If the requester-pays function is enabled for a bucket, this attribute must be set to true when the bucket is requested by a requester other than the bucket owner. Otherwise, status code 403 is returned.
After the requester-pays function is enabled, anonymous access to the bucket is not allowed.
isRequesterPays
- True indicates to enable the requester-pays function.
False indicates to disable the requester-pays function.Copyright © 2021. All rights reserved.