@Override public TableResult postProcessResponse(HttpURLConnection connection, QueryTableOperation operation, CloudTableClient client, OperationContext context, TableResult storageObject) throws Exception { if (this.getResult().getStatusCode() == HttpURLConnection.HTTP_NOT_FOUND) { // Empty result return new TableResult(this.getResult().getStatusCode()); } // Parse response for updates InputStream inStream = connection.getInputStream(); TableResult res = parseResponse(inStream, this.getResult().getStatusCode(), this.getConnection() .getHeaderField(TableConstants.HeaderConstants.ETAG), context, options); connection.getInputStream().close(); return res; }
@Override public TableResult postProcessResponse(HttpURLConnection connection, QueryTableOperation operation, CloudTableClient client, OperationContext context, TableResult storageObject) throws Exception { if (this.getResult().getStatusCode() == HttpURLConnection.HTTP_NOT_FOUND) { // Empty result return new TableResult(this.getResult().getStatusCode()); } // Parse response for updates InputStream inStream = connection.getInputStream(); TableResult res = parseResponse(inStream, this.getResult().getStatusCode(), this.getConnection() .getHeaderField(TableConstants.HeaderConstants.ETAG), context, options); return res; }
if (currMimePart.httpStatusCode == HttpURLConnection.HTTP_NOT_FOUND) { result.add(new TableResult(currMimePart.httpStatusCode)); return result;
if (currMimePart.httpStatusCode == HttpURLConnection.HTTP_NOT_FOUND) { result.add(new TableResult(currMimePart.httpStatusCode)); return result;
final TableRequestOptions options, final OperationContext opContext) throws JsonParseException, IOException, StorageException, InstantiationException, IllegalAccessException { final TableResult res = new TableResult();
final TableRequestOptions options, final OperationContext opContext) throws JsonParseException, IOException, StorageException, InstantiationException, IllegalAccessException { final TableResult res = new TableResult();
&& this.getResult().getStatusCode() == HttpURLConnection.HTTP_CREATED) { return new TableResult();
&& this.getResult().getStatusCode() == HttpURLConnection.HTTP_CREATED) { return new TableResult();
@Override public TableResult preProcessResponse(TableOperation operation, CloudTableClient client, OperationContext context) throws Exception { if (operation.opType == TableOperationType.INSERT) { if (operation.getEchoContent() && this.getResult().getStatusCode() == HttpURLConnection.HTTP_CREATED) { // Insert should receive created if echo content is on return new TableResult(); } else if (!operation.getEchoContent() && this.getResult().getStatusCode() == HttpURLConnection.HTTP_NO_CONTENT) { // Insert should receive no content if echo content is off return operation.parseResponse(null, this.getResult().getStatusCode(), this.getConnection() .getHeaderField(TableConstants.HeaderConstants.ETAG), opContext, options); } } else if (this.getResult().getStatusCode() == HttpURLConnection.HTTP_NO_CONTENT) { // InsertOrMerge and InsertOrReplace should always receive no content return operation.parseResponse(null, this.getResult().getStatusCode(), this.getConnection() .getHeaderField(TableConstants.HeaderConstants.ETAG), opContext, options); } throw TableServiceException.generateTableServiceException(this.getResult(), operation, this.getConnection().getErrorStream(), options.getTablePayloadFormat()); }
@Override public TableResult preProcessResponse(TableOperation operation, CloudTableClient client, OperationContext context) throws Exception { if (operation.opType == TableOperationType.INSERT) { if (operation.getEchoContent() && this.getResult().getStatusCode() == HttpURLConnection.HTTP_CREATED) { // Insert should receive created if echo content is on return new TableResult(); } else if (!operation.getEchoContent() && this.getResult().getStatusCode() == HttpURLConnection.HTTP_NO_CONTENT) { // Insert should receive no content if echo content is off return operation.parseResponse(null, this.getResult().getStatusCode(), this.getConnection() .getHeaderField(TableConstants.HeaderConstants.ETAG), opContext, options); } } else if (this.getResult().getStatusCode() == HttpURLConnection.HTTP_NO_CONTENT) { // InsertOrMerge and InsertOrReplace should always receive no content return operation.parseResponse(null, this.getResult().getStatusCode(), this.getConnection() .getHeaderField(TableConstants.HeaderConstants.ETAG), opContext, options); } throw TableServiceException.generateTableServiceException(this.getResult(), operation, this.getConnection().getErrorStream(), options.getTablePayloadFormat()); }
resObj = new TableResult(httpStatusCode); resObj.setResult(this.getEntity());
resObj = new TableResult(httpStatusCode); resObj.setResult(this.getEntity());