Preflight Table Request

Updated: February 26, 2015

The Preflight Table Request operation queries the Cross-Origin Resource Sharing (CORS) rules for the Table service prior to sending the actual request. A web browser or another user agent sends a preflight request that includes the origin domain, method, and headers for the actual request that the agent wishes to make. If CORS is enabled for the Table service, then the Table service evaluates the preflight request against the CORS rules that the account owner has configured via Set Table Service Properties, and accepts or rejects the request.

The Preflight Table Request may be specified as follows. Replace <account-name> with the name of your storage account. Replace <table-resource> with the name of the table resource that is to be the target of the actual request:

HTTP Verb

Request URI

HTTP Version

OPTIONS

http://<account-name> .table.core.windows.net/<table-resource>

HTTP/1.1

Note that the URI must always include the forward slash (/) to separate the host name from the path and query portions of the URI. In the case of this operation, the path portion of the URI can be empty, or can point to any table resource. The resource may or may not exist at the time the preflight request is made; the preflight request is evaluated at the service level against the service's CORS rules, so the presence or absence of the resource name does not affect the success or failure of the operation.

If CORS is enabled for the service and there is a CORS rule that matches the preflight request, the service responds to the preflight request with status code 200 (OK). The response includes the required Access-Control headers. In this case, the request will be billed.

If CORS is not enabled or no CORS rule matches the preflight request, the service responds with status code 403 (Forbidden). In this case, the request will not be billed.

If the OPTIONS request is malformed, the service responds with status code 400 (Bad Request) and the request is not billed. An example of a malformed request is one that doesn’t contain the required Origin and Access-Control-Request-Method headers.

Note that the preflight request is a mechanism to query the CORS capability of a storage service associated with a certain storage account. The preflight request is not targeted to a specific resource.