|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.baidubce.model.AbstractBceRequest
com.baidubce.services.bos.model.ResponseHeaderOverrides
public class ResponseHeaderOverrides
Container object for overriding headers on a GetObjectRequest or GeneratePresignedUrlRequest response. Response headers can be set on a GetObjectRequest or a GeneratePresignedUrlRequest in order to control particular HTTP headers in the service response from those service interfaces.
For example, a client could dynamically change the apparent Content-Disposition header of a single object, so that it appears to have a different file name for different callers. One client could be configured return the object with
Content-Disposition: attachment; filename=FileName1.exewhile another could return that same object with headers
Content-Disposition: attachment; filename=FileName2.pdf
Field Summary | |
---|---|
static String |
RESPONSE_HEADER_CACHE_CONTROL
|
static String |
RESPONSE_HEADER_CONTENT_DISPOSITION
|
static String |
RESPONSE_HEADER_CONTENT_ENCODING
|
static String |
RESPONSE_HEADER_CONTENT_LANGUAGE
|
static String |
RESPONSE_HEADER_CONTENT_TYPE
|
static String |
RESPONSE_HEADER_EXPIRES
|
Constructor Summary | |
---|---|
ResponseHeaderOverrides()
|
Method Summary | |
---|---|
String |
getCacheControl()
Returns the cache control response header override if it has been specified, or null otherwise. |
String |
getContentDisposition()
Returns the content disposition response header override if it has been specified, or null otherwise. |
String |
getContentEncoding()
Returns the content encoding response header override if it has been specified, or null otherwise. |
String |
getContentLanguage()
Returns the content language response header override if it has been specified, or null otherwise. |
String |
getContentType()
Returns the content type response header override if it has been specified, or null otherwise. |
String |
getExpires()
Returns the expires response header override if it has been specified, or null otherwise. |
void |
setCacheControl(String cacheControl)
Sets the cache control response header. |
void |
setContentDisposition(String contentDisposition)
Sets the content disposition response header override. |
void |
setContentEncoding(String contentEncoding)
Sets the content encoding response header override. |
void |
setContentLanguage(String contentLanguage)
Sets the content language response header override |
void |
setContentType(String contentType)
Sets the content type response header override. |
void |
setExpires(String expires)
Sets the expires response header override. |
ResponseHeaderOverrides |
withCacheControl(String cacheControl)
Sets the cache control response header. |
ResponseHeaderOverrides |
withContentDisposition(String contentDisposition)
Sets the content disposition response header override. |
ResponseHeaderOverrides |
withContentEncoding(String contentEncoding)
Sets the content encoding response header override. |
ResponseHeaderOverrides |
withContentLanguage(String contentLanguage)
Sets the content language response header override |
ResponseHeaderOverrides |
withContentType(String contentType)
Sets the content type response header override. |
ResponseHeaderOverrides |
withExpires(String expires)
Sets the expires response header override. |
ResponseHeaderOverrides |
withRequestCredentials(BceCredentials credentials)
|
Methods inherited from class com.baidubce.model.AbstractBceRequest |
---|
getRequestCredentials, setRequestCredentials |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String RESPONSE_HEADER_CONTENT_TYPE
public static final String RESPONSE_HEADER_CONTENT_LANGUAGE
public static final String RESPONSE_HEADER_EXPIRES
public static final String RESPONSE_HEADER_CACHE_CONTROL
public static final String RESPONSE_HEADER_CONTENT_DISPOSITION
public static final String RESPONSE_HEADER_CONTENT_ENCODING
Constructor Detail |
---|
public ResponseHeaderOverrides()
Method Detail |
---|
public ResponseHeaderOverrides withRequestCredentials(BceCredentials credentials)
withRequestCredentials
in class AbstractBceRequest
public String getContentType()
RESPONSE_HEADER_CONTENT_TYPE
public void setContentType(String contentType)
contentType
- the content type response headerRESPONSE_HEADER_CONTENT_TYPE
public ResponseHeaderOverrides withContentType(String contentType)
contentType
- the content type response header
ResponseHeaderOverrides
object for method chaining.RESPONSE_HEADER_CONTENT_TYPE
public String getContentLanguage()
RESPONSE_HEADER_CONTENT_LANGUAGE
public void setContentLanguage(String contentLanguage)
contentLanguage
- the content language responseRESPONSE_HEADER_CONTENT_LANGUAGE
public ResponseHeaderOverrides withContentLanguage(String contentLanguage)
contentLanguage
- the content language response
ResponseHeaderOverrides
object for method chaining.RESPONSE_HEADER_CONTENT_LANGUAGE
public String getExpires()
RESPONSE_HEADER_EXPIRES
public void setExpires(String expires)
expires
- the expires response headerRESPONSE_HEADER_EXPIRES
public ResponseHeaderOverrides withExpires(String expires)
expires
- the expires response header
ResponseHeaderOverrides
object for method chaining.RESPONSE_HEADER_EXPIRES
public String getCacheControl()
RESPONSE_HEADER_CACHE_CONTROL
public void setCacheControl(String cacheControl)
cacheControl
- the cache control response headerRESPONSE_HEADER_CACHE_CONTROL
public ResponseHeaderOverrides withCacheControl(String cacheControl)
cacheControl
- the cache control response header
ResponseHeaderOverrides
object for method chaining.RESPONSE_HEADER_CACHE_CONTROL
public String getContentDisposition()
RESPONSE_HEADER_CONTENT_DISPOSITION
public void setContentDisposition(String contentDisposition)
contentDisposition
- the content disposition response headerRESPONSE_HEADER_CONTENT_DISPOSITION
public ResponseHeaderOverrides withContentDisposition(String contentDisposition)
contentDisposition
- the content disposition response header
ResponseHeaderOverrides
object for method chaining.RESPONSE_HEADER_CONTENT_DISPOSITION
public String getContentEncoding()
RESPONSE_HEADER_CONTENT_ENCODING
public void setContentEncoding(String contentEncoding)
contentEncoding
- the content encoding response headerRESPONSE_HEADER_CONTENT_ENCODING
public ResponseHeaderOverrides withContentEncoding(String contentEncoding)
contentEncoding
- the content encoding response header
ResponseHeaderOverrides
object for method chaining.RESPONSE_HEADER_CONTENT_ENCODING
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |