public interface ContentProvider extends Iterable<ByteBuffer>
ContentProvider
provides a source of request content.
Implementations should return an Iterator
over the request content.
If the request content comes from a source that needs to be closed (for
example, an InputStream
), then the iterator implementation class
must implement Closeable
and will be closed when the request is
completed (either successfully or failed).
Applications should rely on utility classes such as ByteBufferContentProvider
or PathContentProvider
.Modifier and Type | Interface and Description |
---|---|
static interface |
ContentProvider.Typed
An extension of
ContentProvider that provides a content type string
to be used as a Content-Type HTTP header in requests. |
Copyright © 1995-2015 Webtide. All Rights Reserved.