public Void apply(HttpResponse from) { releasePayload(from); return null; } }
public Void apply(HttpResponse from) { releasePayload(from); return null; } }
public Void apply(HttpResponse from) { releasePayload(from); return null; } }
public Void apply(HttpResponse from) { releasePayload(from); return null; } }
@Override public Boolean apply(HttpResponse from) { releasePayload(from); return from.getStatusCode() == 201; } }
@Override public Boolean apply(HttpResponse from) { releasePayload(from); return from.getStatusCode() == 201; } }
public Boolean apply(HttpResponse from) { releasePayload(from); int code = from.getStatusCode(); if (code >= 300 || code < 200) { throw new IllegalStateException("incorrect code for this operation: " + from); } return true; } }
public Boolean apply(HttpResponse from) { releasePayload(from); int code = from.getStatusCode(); if (code >= 300 || code < 200) { throw new IllegalStateException("incorrect code for this operation: " + from); } return true; } }
public Boolean apply(final HttpResponse from) { releasePayload(from); final int statusCode = from.getStatusCode(); if (statusCode == 200 || statusCode == 202) { return true; } if (statusCode == 204) { return false; } throw new IllegalStateException("not expected response from: " + from); } }
public Boolean apply(HttpResponse from) { releasePayload(from); int code = from.getStatusCode(); if (code >= 300 || code < 200) { throw new IllegalStateException("incorrect code for this operation: " + from); } return true; } }
public boolean shouldRetryRequest(HttpCommand command, HttpResponse response) { releasePayload(response); return ifReplayableBackoffAndReturnTrue(command); }
public PublicAccess apply(HttpResponse from) { releasePayload(from); String access = from.getFirstHeaderOrNull("x-ms-blob-public-access"); if (access == null) { return PublicAccess.PRIVATE; } return PublicAccess.valueOf(access.toUpperCase()); }
public PublicAccess apply(HttpResponse from) { releasePayload(from); String access = from.getFirstHeaderOrNull("x-ms-blob-public-access"); if (access == null) { return PublicAccess.PRIVATE; } return PublicAccess.valueOf(access.toUpperCase()); }
public String apply(HttpResponse from) { releasePayload(from); String eTag = from.getFirstHeaderOrNull(ETAG); if (eTag == null) { // TODO: Cloud Files sends incorrectly cased ETag header... Remove this when fixed. eTag = from.getFirstHeaderOrNull("Etag"); } if (eTag != null) { return eTag; } throw new HttpException("did not receive ETag"); }
public void handleError(HttpCommand command, HttpResponse from) { String content; try { content = from.getPayload() != null ? Strings2.toString(from.getPayload()) : null; command.setException(new HttpResponseException(command, from, content)); } catch (IOException e) { command.setException(new HttpResponseException(command, from)); } finally { releasePayload(from); } } }
public String apply(HttpResponse from) { releasePayload(from); String eTag = from.getFirstHeaderOrNull(ETAG); if (eTag == null) { // TODO: Cloud Files sends incorrectly cased ETag header... Remove this when fixed. eTag = from.getFirstHeaderOrNull("Etag"); } if (eTag != null) { return eTag; } throw new HttpException("did not receive ETag"); }
public String apply(HttpResponse from) { releasePayload(from); String eTag = from.getFirstHeaderOrNull(ETAG); if (eTag == null) { // TODO: Cloud Files sends incorrectly cased ETag header... Remove this when fixed. eTag = from.getFirstHeaderOrNull("Etag"); } if (eTag != null) { return eTag; } throw new HttpException("did not receive ETag"); }
public void handleError(HttpCommand command, HttpResponse from) { String content; try { content = from.getPayload() != null ? Strings2.toString(from.getPayload()) : null; command.setException(new HttpResponseException(command, from, content)); } catch (IOException e) { command.setException(new HttpResponseException(command, from)); } finally { releasePayload(from); } } }
public String apply(HttpResponse from) { releasePayload(from); String eTag = from.getFirstHeaderOrNull(ETAG); if (eTag == null) { // TODO: Cloud Files sends incorrectly cased ETag header... Remove this when fixed. eTag = from.getFirstHeaderOrNull("Etag"); } if (eTag != null) { return eTag; } throw new HttpException("did not receive ETag"); }
public void handleError(HttpCommand command, HttpResponse from) { String content; try { content = from.getPayload() != null ? Strings2.toStringAndClose(from.getPayload().openStream()) : null; command.setException(new HttpResponseException(command, from, content)); } catch (IOException e) { command.setException(new HttpResponseException(command, from)); } finally { releasePayload(from); } } }