http-types 0.7.3.0.1 → 0.8.0
raw patch · 5 files changed
+20/−61 lines, 5 filesdep ~case-insensitivePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: case-insensitive
API changes (from Hackage documentation)
- Network.HTTP.Types: hAccept, hUserAgent, hServer, hReferer, hRange, hLocation, hLastModified, hIfRange, hIfModifiedSince, hDate, hCookie, hContentType, hContentMD5, hContentLength, hContentEncoding, hConnection, hCacheControl, hAuthorization, hAcceptLanguage :: HeaderName
- Network.HTTP.Types: headerAccept, headerDate, headerContentMD5, headerContentType, headerContentLength, headerConnection, headerCacheControl, headerAuthorization :: ByteString -> Header
- Network.HTTP.Types: methodGet, methodOptions, methodConnect, methodTrace, methodDelete, methodPut, methodHead, methodPost :: Method
- Network.HTTP.Types: type Ascii = ByteString
- Network.HTTP.Types.Header: hAccept, hUserAgent, hServer, hReferer, hRange, hLocation, hLastModified, hIfRange, hIfModifiedSince, hDate, hCookie, hContentType, hContentMD5, hContentLength, hContentEncoding, hConnection, hCacheControl, hAuthorization, hAcceptLanguage :: HeaderName
- Network.HTTP.Types.Header: headerAccept, headerDate, headerContentMD5, headerContentType, headerContentLength, headerConnection, headerCacheControl, headerAuthorization :: ByteString -> Header
- Network.HTTP.Types.Method: methodGet, methodOptions, methodConnect, methodTrace, methodDelete, methodPut, methodHead, methodPost :: Method
+ Network.HTTP.Types: PATCH :: StdMethod
+ Network.HTTP.Types: hAccept :: HeaderName
+ Network.HTTP.Types: hAcceptLanguage :: HeaderName
+ Network.HTTP.Types: hAuthorization :: HeaderName
+ Network.HTTP.Types: hCacheControl :: HeaderName
+ Network.HTTP.Types: hConnection :: HeaderName
+ Network.HTTP.Types: hContentEncoding :: HeaderName
+ Network.HTTP.Types: hContentLength :: HeaderName
+ Network.HTTP.Types: hContentMD5 :: HeaderName
+ Network.HTTP.Types: hContentType :: HeaderName
+ Network.HTTP.Types: hCookie :: HeaderName
+ Network.HTTP.Types: hDate :: HeaderName
+ Network.HTTP.Types: hIfModifiedSince :: HeaderName
+ Network.HTTP.Types: hIfRange :: HeaderName
+ Network.HTTP.Types: hLastModified :: HeaderName
+ Network.HTTP.Types: hLocation :: HeaderName
+ Network.HTTP.Types: hRange :: HeaderName
+ Network.HTTP.Types: hReferer :: HeaderName
+ Network.HTTP.Types: hServer :: HeaderName
+ Network.HTTP.Types: hUserAgent :: HeaderName
+ Network.HTTP.Types: methodConnect :: Method
+ Network.HTTP.Types: methodDelete :: Method
+ Network.HTTP.Types: methodGet :: Method
+ Network.HTTP.Types: methodHead :: Method
+ Network.HTTP.Types: methodOptions :: Method
+ Network.HTTP.Types: methodPost :: Method
+ Network.HTTP.Types: methodPut :: Method
+ Network.HTTP.Types: methodTrace :: Method
+ Network.HTTP.Types: type HeaderName = CI ByteString
+ Network.HTTP.Types.Header: hAccept :: HeaderName
+ Network.HTTP.Types.Header: hAcceptLanguage :: HeaderName
+ Network.HTTP.Types.Header: hAuthorization :: HeaderName
+ Network.HTTP.Types.Header: hCacheControl :: HeaderName
+ Network.HTTP.Types.Header: hConnection :: HeaderName
+ Network.HTTP.Types.Header: hContentEncoding :: HeaderName
+ Network.HTTP.Types.Header: hContentLength :: HeaderName
+ Network.HTTP.Types.Header: hContentMD5 :: HeaderName
+ Network.HTTP.Types.Header: hContentType :: HeaderName
+ Network.HTTP.Types.Header: hCookie :: HeaderName
+ Network.HTTP.Types.Header: hDate :: HeaderName
+ Network.HTTP.Types.Header: hIfModifiedSince :: HeaderName
+ Network.HTTP.Types.Header: hIfRange :: HeaderName
+ Network.HTTP.Types.Header: hLastModified :: HeaderName
+ Network.HTTP.Types.Header: hLocation :: HeaderName
+ Network.HTTP.Types.Header: hRange :: HeaderName
+ Network.HTTP.Types.Header: hReferer :: HeaderName
+ Network.HTTP.Types.Header: hServer :: HeaderName
+ Network.HTTP.Types.Header: hUserAgent :: HeaderName
+ Network.HTTP.Types.Method: PATCH :: StdMethod
+ Network.HTTP.Types.Method: methodConnect :: Method
+ Network.HTTP.Types.Method: methodDelete :: Method
+ Network.HTTP.Types.Method: methodGet :: Method
+ Network.HTTP.Types.Method: methodHead :: Method
+ Network.HTTP.Types.Method: methodOptions :: Method
+ Network.HTTP.Types.Method: methodPatch :: Method
+ Network.HTTP.Types.Method: methodPost :: Method
+ Network.HTTP.Types.Method: methodPut :: Method
+ Network.HTTP.Types.Method: methodTrace :: Method
Files
- Network/HTTP/Types.hs +8/−24
- Network/HTTP/Types/Header.hs +0/−28
- Network/HTTP/Types/Method.hs +7/−3
- Network/HTTP/Types/Status.hs +3/−4
- http-types.cabal +2/−2
Network/HTTP/Types.hs view
@@ -1,10 +1,8 @@ {-# LANGUAGE OverloadedStrings #-} module Network.HTTP.Types (- -- * General- Ascii -- * Methods-, Method+ Method , methodGet , methodPost , methodHead@@ -115,6 +113,7 @@ -- * Headers -- ** Types , Header+, HeaderName , RequestHeaders , ResponseHeaders -- ** Common headers@@ -175,27 +174,12 @@ , urlEncodeBuilder , urlEncode , urlDecode- -- * Deprecated functions- -- ** as of 0.7.0-, headerAccept-, headerAuthorization-, headerCacheControl-, headerConnection-, headerContentLength-, headerContentType-, headerContentMD5-, headerDate ) where -import Network.HTTP.Types.Method-import Network.HTTP.Types.Version-import Network.HTTP.Types.Status-import Network.HTTP.Types.Header-import Network.HTTP.Types.URI-import Network.HTTP.Types.QueryLike-import qualified Data.ByteString as B---- | Type synonym for ASCII ByteStrings (deprecated).-type Ascii = B.ByteString-{-# DEPRECATED Ascii "Deprecated Ascii type" #-}+import Network.HTTP.Types.Header+import Network.HTTP.Types.Method+import Network.HTTP.Types.QueryLike+import Network.HTTP.Types.Status+import Network.HTTP.Types.URI+import Network.HTTP.Types.Version
Network/HTTP/Types/Header.hs view
@@ -33,15 +33,6 @@ , ByteRanges , renderByteRangesBuilder , renderByteRanges- -- ** Deprecated-, headerAccept-, headerAuthorization-, headerCacheControl-, headerConnection-, headerContentLength-, headerContentType-, headerContentMD5-, headerDate ) where @@ -86,25 +77,6 @@ hReferer = "Referer" hServer = "Server" hUserAgent = "User-Agent"---- | HTTP Headers-headerAccept, headerAuthorization, headerCacheControl, headerConnection, headerContentLength, headerContentType, headerContentMD5, headerDate :: B.ByteString -> Header-headerAccept = (,) hAccept-{-# DEPRECATED headerAccept "Use hAccept instead" #-}-headerAuthorization = (,) hAuthorization-{-# DEPRECATED headerAuthorization "Use hAuthorization instead" #-}-headerCacheControl = (,) hCacheControl-{-# DEPRECATED headerCacheControl "Use hCacheControl instead" #-}-headerConnection = (,) hConnection-{-# DEPRECATED headerConnection "Use hConnection instead" #-}-headerContentLength = (,) hContentLength-{-# DEPRECATED headerContentLength "Use hContentLength instead" #-}-headerContentMD5 = (,) hContentMD5-{-# DEPRECATED headerContentMD5 "Use hContentMD5 instead" #-}-headerContentType = (,) hContentType-{-# DEPRECATED headerContentType "Use hContentType instead" #-}-headerDate = (,) hDate-{-# DEPRECATED headerDate "Use hDate instead" #-} -- | RFC 2616 Byte range (individual). --
Network/HTTP/Types/Method.hs view
@@ -9,6 +9,7 @@ , methodTrace , methodConnect , methodOptions+, methodPatch , StdMethod(..) , parseMethod , renderMethod@@ -25,7 +26,7 @@ type Method = B.ByteString -- | HTTP Method constants.-methodGet, methodPost, methodHead, methodPut, methodDelete, methodTrace, methodConnect, methodOptions :: Method+methodGet, methodPost, methodHead, methodPut, methodDelete, methodTrace, methodConnect, methodOptions, methodPatch :: Method methodGet = renderStdMethod GET methodPost = renderStdMethod POST methodHead = renderStdMethod HEAD@@ -34,17 +35,20 @@ methodTrace = renderStdMethod TRACE methodConnect = renderStdMethod CONNECT methodOptions = renderStdMethod OPTIONS+methodPatch = renderStdMethod PATCH --- | HTTP standard method (as defined by RFC 2616).+-- | HTTP standard method (as defined by RFC 2616, and PATCH which is defined+-- by RFC 5789). data StdMethod = GET | POST- | HEAD + | HEAD | PUT | DELETE | TRACE | CONNECT | OPTIONS+ | PATCH deriving (Read, Show, Eq, Ord, Enum, Bounded, Ix) -- These are ordered by suspected frequency. More popular methods should go first. -- The reason is that methodList is used with lookup.
Network/HTTP/Types/Status.hs view
@@ -93,8 +93,7 @@ ) where -import qualified Data.ByteString as B-import Data.ByteString.Char8 () {- IsString -}+import qualified Data.ByteString as B -- | HTTP Status. -- @@ -159,11 +158,11 @@ toEnum 503 = status503 toEnum 504 = status504 toEnum 505 = status505- toEnum c = Status c B.empty+ toEnum c = mkStatus c B.empty -- | Create a Status from status code and message. mkStatus :: Int -> B.ByteString -> Status-mkStatus = Status+mkStatus i m = Status i m -- | Continue 100 status100 :: Status
http-types.cabal view
@@ -7,7 +7,7 @@ -- The package version. See the Haskell package versioning policy -- (http://www.haskell.org/haskellwiki/Package_versioning_policy) for -- standards guiding when and how versions should be incremented.-Version: 0.7.3.0.1+Version: 0.8.0 -- A short (one-line) description of the package. Synopsis: Generic HTTP types for Haskell (for both client and server code).@@ -71,7 +71,7 @@ Build-depends: base >= 4 && < 5, bytestring >=0.9.1.5 && <0.11, array >=0.2 && <0.5,- case-insensitive >=0.2 && <0.5,+ case-insensitive >=0.2 && <1.1, blaze-builder >= 0.2.1.4 && < 0.4, text >= 0.11.0.2 && < 0.12