Copyright | (c) 2013-2018 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 |
Synopsis
- newtype RsBody = RsBody {
- _streamBody :: ConduitM () ByteString (ResourceT IO) ()
- fuseStream :: RsBody -> ConduitM ByteString ByteString (ResourceT IO) () -> RsBody
- newtype ChunkSize = ChunkSize Int
- defaultChunkSize :: ChunkSize
- data ChunkedBody = ChunkedBody {
- _chunkedSize :: !ChunkSize
- _chunkedLength :: !Integer
- _chunkedBody :: ConduitM () ByteString (ResourceT IO) ()
- chunkedLength :: Lens' ChunkedBody Integer
- fuseChunks :: ChunkedBody -> ConduitM ByteString ByteString (ResourceT IO) () -> ChunkedBody
- fullChunks :: ChunkedBody -> Integer
- remainderBytes :: ChunkedBody -> Maybe Integer
- data HashedBody
- = HashedStream (Digest SHA256) !Integer (ConduitM () ByteString (ResourceT IO) ())
- | 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
- toHashed :: a -> HashedBody
- class ToBody a where
- _Body :: ToBody a => AReview RqBody a
Documentation
A streaming, exception safe response body.
RsBody | |
|
fuseStream :: RsBody -> ConduitM ByteString ByteString (ResourceT IO) () -> RsBody Source #
Specifies the transmitted size of the 'Transfer-Encoding' chunks.
See: defaultChunk
.
Instances
Enum ChunkSize Source # | |
Defined in Network.AWS.Data.Body succ :: ChunkSize -> ChunkSize # pred :: ChunkSize -> ChunkSize # fromEnum :: ChunkSize -> Int # enumFrom :: ChunkSize -> [ChunkSize] # enumFromThen :: ChunkSize -> ChunkSize -> [ChunkSize] # enumFromTo :: ChunkSize -> ChunkSize -> [ChunkSize] # enumFromThenTo :: ChunkSize -> ChunkSize -> ChunkSize -> [ChunkSize] # | |
Eq ChunkSize Source # | |
Integral ChunkSize Source # | |
Defined in Network.AWS.Data.Body | |
Num ChunkSize Source # | |
Defined in Network.AWS.Data.Body | |
Ord ChunkSize Source # | |
Defined in Network.AWS.Data.Body | |
Real ChunkSize Source # | |
Defined in Network.AWS.Data.Body toRational :: ChunkSize -> Rational # | |
Show ChunkSize Source # | |
ToLog ChunkSize Source # | |
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.
ChunkedBody | |
|
Instances
Show ChunkedBody Source # | |
Defined in Network.AWS.Data.Body showsPrec :: Int -> ChunkedBody -> ShowS # show :: ChunkedBody -> String # showList :: [ChunkedBody] -> ShowS # | |
ToBody ChunkedBody Source # | |
Defined in Network.AWS.Data.Body toBody :: ChunkedBody -> RqBody Source # |
fuseChunks :: ChunkedBody -> ConduitM ByteString ByteString (ResourceT IO) () -> ChunkedBody Source #
fullChunks :: ChunkedBody -> Integer Source #
remainderBytes :: ChunkedBody -> Maybe Integer Source #
data HashedBody Source #
An opaque request body containing a SHA256
hash.
HashedStream (Digest SHA256) !Integer (ConduitM () ByteString (ResourceT IO) ()) | |
HashedBytes (Digest SHA256) ByteString |
Instances
Show HashedBody Source # | |
Defined in Network.AWS.Data.Body showsPrec :: Int -> HashedBody -> ShowS # show :: HashedBody -> String # showList :: [HashedBody] -> ShowS # | |
IsString HashedBody Source # | |
Defined in Network.AWS.Data.Body fromString :: String -> HashedBody # | |
ToBody HashedBody Source # | |
Defined in Network.AWS.Data.Body toBody :: HashedBody -> RqBody Source # | |
ToHashedBody HashedBody Source # | |
Defined in Network.AWS.Data.Body toHashed :: HashedBody -> HashedBody Source # |
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.
Instances
Anything that can be converted to a streaming request Body
.
Nothing
toBody :: a -> RqBody Source #
Convert a value to a request body.
toBody :: ToHashedBody a => a -> RqBody Source #
Convert a value to a request body.
Instances
ToBody ByteString Source # | |
Defined in Network.AWS.Data.Body toBody :: ByteString -> RqBody Source # | |
ToBody ByteString Source # | |
Defined in Network.AWS.Data.Body toBody :: ByteString -> RqBody Source # | |
ToBody Text Source # | |
ToBody Value Source # | |
ToBody String Source # | |
ToBody Text Source # | |
ToBody Element Source # | |
ToBody QueryString Source # | |
Defined in Network.AWS.Data.Body toBody :: QueryString -> RqBody Source # | |
ToBody RqBody Source # | |
ToBody HashedBody Source # | |
Defined in Network.AWS.Data.Body toBody :: HashedBody -> RqBody Source # | |
ToBody ChunkedBody Source # | |
Defined in Network.AWS.Data.Body toBody :: ChunkedBody -> RqBody Source # | |
ToBody Base64 Source # | |
ToHashedBody a => ToBody (Maybe a) Source # | |
ToBody (HashMap Text Value) Source # | |