TableServiceCorsRule Class
- java.
lang. Object - com.
azure. data. tables. models. TableServiceCorsRule
- com.
Implements
public final class TableServiceCorsRule
implements XmlSerializable<TableServiceCorsRule>
CORS is an HTTP feature that enables a web application running under one domain to access resources in another domain. Web browsers implement a security restriction known as same-origin policy that prevents a web page from calling APIs in a different domain; CORS provides a secure way to allow one domain (the origin domain) to call APIs in another domain.
Constructor Summary
Constructor | Description |
---|---|
TableServiceCorsRule() |
Creates an instance of Table |
Method Summary
Modifier and Type | Method and Description |
---|---|
static
Table |
fromXml(XmlReader xmlReader)
Reads an instance of Table |
static
Table |
fromXml(XmlReader xmlReader, String rootElementName)
Reads an instance of Table |
String |
getAllowedHeaders()
Get the allowed |
String |
getAllowedMethods()
Get the allowed |
String |
getAllowedOrigins()
Get the allowed |
String |
getExposedHeaders()
Get the exposed |
int |
getMaxAgeInSeconds()
Get the max |
Table |
setAllowedHeaders(String allowedHeaders)
Set the allowed |
Table |
setAllowedMethods(String allowedMethods)
Set the allowed |
Table |
setAllowedOrigins(String allowedOrigins)
Set the allowed |
Table |
setExposedHeaders(String exposedHeaders)
Set the exposed |
Table |
setMaxAgeInSeconds(int maxAgeInSeconds)
Set the max |
Xml |
toXml(XmlWriter xmlWriter) |
Xml |
toXml(XmlWriter xmlWriter, String rootElementName) |
Methods inherited from java.lang.Object
Constructor Details
TableServiceCorsRule
public TableServiceCorsRule()
Creates an instance of TableServiceCorsRule class.
Method Details
fromXml
public static TableServiceCorsRule fromXml(XmlReader xmlReader)
Reads an instance of TableServiceCorsRule from the XmlReader.
Parameters:
Returns:
Throws:
fromXml
public static TableServiceCorsRule fromXml(XmlReader xmlReader, String rootElementName)
Reads an instance of TableServiceCorsRule from the XmlReader.
Parameters:
Returns:
Throws:
getAllowedHeaders
public String getAllowedHeaders()
Get the allowedHeaders property: The request headers that the origin domain may specify on the CORS request.
Returns:
getAllowedMethods
public String getAllowedMethods()
Get the allowedMethods property: The methods (HTTP request verbs) that the origin domain may use for a CORS request. (comma separated).
Returns:
getAllowedOrigins
public String getAllowedOrigins()
Get the allowedOrigins property: The origin domains that are permitted to make a request against the service via CORS. The origin domain is the domain from which the request originates. Note that the origin must be an exact case-sensitive match with the origin that the user age sends to the service. You can also use the wildcard character '*' to allow all origin domains to make requests via CORS.
Returns:
getExposedHeaders
public String getExposedHeaders()
Get the exposedHeaders property: The response headers that may be sent in the response to the CORS request and exposed by the browser to the request issuer.
Returns:
getMaxAgeInSeconds
public int getMaxAgeInSeconds()
Get the maxAgeInSeconds property: The maximum amount time that a browser should cache the preflight OPTIONS request.
Returns:
setAllowedHeaders
public TableServiceCorsRule setAllowedHeaders(String allowedHeaders)
Set the allowedHeaders property: The request headers that the origin domain may specify on the CORS request.
Parameters:
Returns:
setAllowedMethods
public TableServiceCorsRule setAllowedMethods(String allowedMethods)
Set the allowedMethods property: The methods (HTTP request verbs) that the origin domain may use for a CORS request. (comma separated).
Parameters:
Returns:
setAllowedOrigins
public TableServiceCorsRule setAllowedOrigins(String allowedOrigins)
Set the allowedOrigins property: The origin domains that are permitted to make a request against the service via CORS. The origin domain is the domain from which the request originates. Note that the origin must be an exact case-sensitive match with the origin that the user age sends to the service. You can also use the wildcard character '*' to allow all origin domains to make requests via CORS.
Parameters:
Returns:
setExposedHeaders
public TableServiceCorsRule setExposedHeaders(String exposedHeaders)
Set the exposedHeaders property: The response headers that may be sent in the response to the CORS request and exposed by the browser to the request issuer.
Parameters:
Returns:
setMaxAgeInSeconds
public TableServiceCorsRule setMaxAgeInSeconds(int maxAgeInSeconds)
Set the maxAgeInSeconds property: The maximum amount time that a browser should cache the preflight OPTIONS request.
Parameters:
Returns:
toXml
toXml
public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName)
Parameters:
Throws:
Applies to
Azure SDK for Java