microsoft-azure-storage/src/com/microsoft/azure/storage/table/TableRequest.java
private static HttpURLConnection coreCreate(final URI rootUri, final TableRequestOptions tableOptions,
            final UriQueryBuilder queryBuilder, final OperationContext opContext, final String tableName,
            final String eTag, final String identity, final String requestMethod) throws IOException,
            URISyntaxException, StorageException {

        URI queryUri = null;

        // Do point query / delete etc.
        if (!Utility.isNullOrEmpty(identity)) {
            queryUri = PathUtility.appendPathToSingleUri(rootUri, tableName.concat(String.format("(%s)", identity)));
        }
        else {
            queryUri = PathUtility.appendPathToSingleUri(rootUri, tableName);
        }

        final HttpURLConnection retConnection = BaseRequest.createURLConnection(queryUri, tableOptions, queryBuilder,
                opContext);

        setAcceptHeaderForHttpWebRequest(retConnection, tableOptions.getTablePayloadFormat());

        retConnection.setRequestProperty(Constants.HeaderConstants.CONTENT_TYPE,
                TableConstants.HeaderConstants.JSON_CONTENT_TYPE);

        retConnection.setRequestProperty(TableConstants.HeaderConstants.MAX_DATA_SERVICE_VERSION,
                TableConstants.HeaderConstants.MAX_DATA_SERVICE_VERSION_VALUE);

        if (!Utility.isNullOrEmpty(eTag)) {
            retConnection.setRequestProperty(Constants.HeaderConstants.IF_MATCH, eTag);
        }

        retConnection.setRequestMethod(requestMethod);
        return retConnection;
    }
private static HttpURLConnection coreCreate(final URI rootUri, final TableRequestOptions tableOptions,
            final UriQueryBuilder queryBuilder, final OperationContext opContext, final String tableName,
            final String eTag, final String identity, final String requestMethod) throws IOException,
            URISyntaxException, StorageException {

        URI queryUri = null;

        // Do point query / delete etc.
        if (!Utility.isNullOrEmpty(identity)) {
            queryUri = PathUtility.appendPathToSingleUri(rootUri, tableName.concat(String.format("(%s)", identity)));
        }
        else {
            queryUri = PathUtility.appendPathToSingleUri(rootUri, tableName);
        }

        final HttpURLConnection retConnection = BaseRequest.createURLConnection(queryUri, tableOptions, queryBuilder,
                opContext);

        setAcceptHeaderForHttpWebRequest(retConnection, tableOptions.getTablePayloadFormat());

        retConnection.setRequestProperty(Constants.HeaderConstants.CONTENT_TYPE,
                TableConstants.HeaderConstants.JSON_CONTENT_TYPE);

        retConnection.setRequestProperty(TableConstants.HeaderConstants.MAX_DATA_SERVICE_VERSION,
                TableConstants.HeaderConstants.MAX_DATA_SERVICE_VERSION_VALUE);

        if (!Utility.isNullOrEmpty(eTag)) {
            retConnection.setRequestProperty(Constants.HeaderConstants.IF_MATCH, eTag);
        }

        retConnection.setRequestMethod(requestMethod);
        return retConnection;
    }
Reserved for internal use. Constructs the core <code>HttpURLConnection</code> to perform an operation.

@param rootUri
A <code>java.net.URI</code> containing an absolute URI to the resource.
@param queryBuilder
The <code>UriQueryBuilder</code> for the request.
@param opContext
An {@link OperationContext} object for tracking the current operation.
@param tableName
The name of the table.
@param identity
The identity of the entity, to pass in the Service Managment REST operation URI as
<code><em>tableName</em>(<em>identity</em>)</code>. If <code>null</code>, only the <em>tableName</em>
value will be passed.
@param requestMethod
The HTTP request method to set.
@param options
A {@link TableRequestOptions} object that specifies execution options such as retry policy and timeout
settings for the operation. This parameter is unused.
@return
An <code>HttpURLConnection</code> to use to perform the operation.

@throws IOException
if there is an error opening the connection.
@throws URISyntaxException
if the resource URI is invalid.
@throws StorageException
if a storage service error occurred during the operation.