Copyright | (c) 2013-2017 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | provisional |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
- newtype RsBody = RsBody {}
- fuseStream :: RsBody -> Conduit ByteString (ResourceT IO) ByteString -> RsBody
- newtype ChunkSize = ChunkSize Int
- defaultChunkSize :: ChunkSize
- data ChunkedBody = ChunkedBody {}
- chunkedLength :: Lens' ChunkedBody Integer
- fuseChunks :: ChunkedBody -> Conduit ByteString (ResourceT IO) ByteString -> ChunkedBody
- fullChunks :: ChunkedBody -> Integer
- remainderBytes :: ChunkedBody -> Maybe Integer
- data HashedBody
- = HashedStream (Digest SHA256) !Integer (Source (ResourceT IO) ByteString)
- | HashedBytes (Digest SHA256) ByteString
- sha256Base16 :: HashedBody -> ByteString
- data RqBody
- md5Base64 :: RqBody -> Maybe ByteString
- isStreaming :: RqBody -> Bool
- toRequestBody :: RqBody -> RequestBody
- contentLength :: RqBody -> Integer
- class ToHashedBody a where
- class ToBody a where
- _Body :: ToBody a => AReview RqBody a
Documentation
A streaming, exception safe response body.
fuseStream :: RsBody -> Conduit ByteString (ResourceT IO) ByteString -> RsBody Source #
Specifies the transmitted size of the 'Transfer-Encoding' chunks.
See: defaultChunk
.
defaultChunkSize :: ChunkSize Source #
The default chunk size of 128 KB. The minimum chunk size accepted by AWS is 8 KB, unless the entirety of the request is below this threshold.
A chunk size of 64 KB or higher is recommended for performance reasons.
data ChunkedBody Source #
An opaque request body which will be transmitted via
Transfer-Encoding: chunked
.
Invariant: Only services that support chunked encoding can
accept a ChunkedBody
. (Currently S3.) This is enforced by the type
signatures emitted by the generator.
fuseChunks :: ChunkedBody -> Conduit ByteString (ResourceT IO) ByteString -> ChunkedBody Source #
fullChunks :: ChunkedBody -> Integer Source #
remainderBytes :: ChunkedBody -> Maybe Integer Source #
data HashedBody Source #
An opaque request body containing a SHA256
hash.
sha256Base16 :: HashedBody -> ByteString Source #
Invariant: only services that support _both_ standard and
chunked signing expose RqBody
as a parameter.
isStreaming :: RqBody -> Bool Source #
toRequestBody :: RqBody -> RequestBody Source #
contentLength :: RqBody -> Integer Source #
class ToHashedBody a where Source #
Anything that can be safely converted to a HashedBody
.
toHashed :: a -> HashedBody Source #
Convert a value to a hashed request body.
Anything that can be converted to a streaming request Body
.
toBody :: a -> RqBody Source #
Convert a value to a request body.
toBody :: ToHashedBody a => a -> RqBody Source #
Convert a value to a request body.