List of usage examples for com.amazonaws DefaultRequest addHeader
public void addHeader(String name, String value)
From source file:com.ghedeon.AwsInterceptor.java
License:Apache License
private void setBody(@Nonnull DefaultRequest awsRequest, @Nullable RequestBody body) throws IOException { if (body == null) { return;// w ww . j a va 2 s . co m } Buffer buffer = new Buffer(); body.writeTo(buffer); awsRequest.setContent(new ByteArrayInputStream(buffer.readByteArray())); awsRequest.addHeader("Content-Length", String.valueOf(body.contentLength())); buffer.close(); }