@@ -134,6 +134,9 @@ module Network.HTTP.Req
134 , awsAuth
134 , awsAuth
135 -- *** Other
135 -- *** Other
137 -- * Response
140 -- * Response
138 , HttpResponse (..)
141 , HttpResponse (..)
139 -- * Other
142 -- * Other
@@ -653,9 +656,41 @@ port :: Word -> Option scheme
653port n = withRequest $ \x ->
656port n = withRequest $ \x ->
654 x { L.port = fromIntegral n }
657 x { L.port = fromIntegral n }
659+-- | This 'Option' controls whether gzipped data should be decompressed on
660+-- the fly. By default everything except for @application\/x-tar@ is
661+-- decompressed, i.e. we have:
656−-- TODO decompress
663+-- > decompress (/= "application/x-tar")
665+-- You can also choose to decompress everything like this:
667+-- > decompress (const True)
670+ :: (ByteString -> Bool) -- ^ Predicate that is given MIME type, it
671+ -- returns 'True' when content should be decompressed on the fly.
673+decompress f = withRequest $ \x ->
674+ x { L.decompress = f }
676+-- | Specify number of microseconds to wait for response. Default is 30
657−-- TODO responseTimeout
679+responseTimeout
680+ :: Word -- ^ Number of microseconds to wait
682+responseTimeout n = withRequest $ \x ->
683+ x { L.responseTimeout = LI.ResponseTimeoutMicro (fromIntegral n) }
685+-- | HTTP version to send to server, default is HTTP 1.1.
688+ :: Word -- ^ Major version number
689+ -> Word -- ^ Minor version number
691+httpVersion major minor = withRequest $ \x ->
658−-- TODO requestVersion
692+ x { L.requestVersion =
693+ Y.HttpVersion (fromIntegral major) (fromIntegral minor) }
660----------------------------------------------------------------------------
695----------------------------------------------------------------------------
661-- Response
696-- Response