@Override public Request content(ContentProvider content) { return content(content, null); }
@Override public Request content(ContentProvider content) { return content(content, null); }
@Override public Request content(ContentProvider content) { return content(content, null); }
@Override public Request file(Path file, String contentType) throws IOException { return content(new PathContentProvider(contentType, file)); }
@Override public Request file(Path file, String contentType) throws IOException { if (contentType != null) header(HttpHeader.CONTENT_TYPE.asString(), contentType); return content(new PathContentProvider(file)); }
@Override public Request file(Path file, String contentType) throws IOException { if (contentType != null) header(HttpHeader.CONTENT_TYPE.asString(), contentType); return content(new PathContentProvider(file)); }
if (bodySource instanceof StaticBodyGenerator) { StaticBodyGenerator staticBodyGenerator = (StaticBodyGenerator) bodySource; jettyRequest.content(new BytesContentProvider(staticBodyGenerator.getBody())); bytesWritten.addAndGet(staticBodyGenerator.getBody().length); jettyRequest.content(new InputStreamBodySourceContentProvider((InputStreamBodySource) bodySource, bytesWritten)); jettyRequest.content(new DynamicBodySourceContentProvider((DynamicBodySource) bodySource, bytesWritten));
if (bodyGenerator instanceof StaticBodyGenerator) { StaticBodyGenerator staticBodyGenerator = (StaticBodyGenerator) bodyGenerator; jettyRequest.content(new BytesContentProvider(staticBodyGenerator.getBody())); jettyRequest.content(fileContentProvider(path)); jettyRequest.content(new BodyGeneratorContentProvider(bodyGenerator, httpClient.getExecutor()));