Review fixes
This commit is contained in:
parent
7cdebce96b
commit
501212e6b9
5 changed files with 9 additions and 20 deletions
|
@ -41,7 +41,7 @@ library
|
|||
, base64-bytestring >= 1.0.0.1 && < 1.1
|
||||
, bytestring >= 0.10 && < 0.11
|
||||
, exceptions >= 0.8 && < 0.9
|
||||
, http-api-data >= 0.1 && < 0.4
|
||||
, http-api-data >= 0.3 && < 0.4
|
||||
, http-client >= 0.4.18.1 && < 0.6
|
||||
, http-client-tls >= 0.2.2 && < 0.4
|
||||
, http-media >= 0.6.2 && < 0.7
|
||||
|
|
|
@ -30,7 +30,7 @@ module Servant.ClientSpec where
|
|||
import Control.Applicative ((<$>))
|
||||
#endif
|
||||
import Control.Arrow (left)
|
||||
import Control.Concurrent (ThreadId, forkIO, killThread)
|
||||
import Control.Concurrent (forkIO, killThread, ThreadId)
|
||||
import Control.Exception (bracket)
|
||||
import Control.Monad.Trans.Except (throwE )
|
||||
import Data.Aeson
|
||||
|
@ -44,8 +44,7 @@ import qualified Network.HTTP.Client as C
|
|||
import Network.HTTP.Media
|
||||
import qualified Network.HTTP.Types as HTTP
|
||||
import Network.Socket
|
||||
import Network.Wai (Request, requestHeaders,
|
||||
responseLBS)
|
||||
import Network.Wai (Request, requestHeaders, responseLBS)
|
||||
import Network.Wai.Handler.Warp
|
||||
import System.IO.Unsafe (unsafePerformIO)
|
||||
import Test.Hspec
|
||||
|
@ -121,9 +120,9 @@ getBody :: Person -> SCR.ClientM Person
|
|||
getQueryParam :: Maybe String -> SCR.ClientM Person
|
||||
getQueryParams :: [String] -> SCR.ClientM [Person]
|
||||
getQueryFlag :: Bool -> SCR.ClientM Bool
|
||||
getRawSuccess :: HTTP.Method
|
||||
getRawSuccess :: HTTP.Method
|
||||
-> SCR.ClientM (Int, BS.ByteString, MediaType, [HTTP.Header], C.Response BS.ByteString)
|
||||
getRawFailure :: HTTP.Method
|
||||
getRawFailure :: HTTP.Method
|
||||
-> SCR.ClientM (Int, BS.ByteString, MediaType, [HTTP.Header], C.Response BS.ByteString)
|
||||
getMultiple :: String -> Maybe Int -> Bool -> [(String, [Rational])]
|
||||
-> SCR.ClientM (String, Maybe Int, Bool, [(String, [Rational])])
|
||||
|
|
|
@ -52,7 +52,7 @@ library
|
|||
, base64-bytestring >= 1.0 && < 1.1
|
||||
, bytestring >= 0.10 && < 0.11
|
||||
, containers >= 0.5 && < 0.6
|
||||
, http-api-data >= 0.1 && < 0.4
|
||||
, http-api-data >= 0.3 && < 0.4
|
||||
, http-types >= 0.8 && < 0.10
|
||||
, network-uri >= 2.6 && < 2.7
|
||||
, mtl >= 2 && < 2.3
|
||||
|
|
|
@ -42,19 +42,10 @@ import Network.Wai (Application, Request, Response,
|
|||
responseLBS, vault)
|
||||
import Prelude ()
|
||||
import Prelude.Compat
|
||||
import Web.HttpApiData (FromHttpApiData)
|
||||
#if MIN_VERSION_http_api_data(0,3,0)
|
||||
import Web.Internal.HttpApiData (parseHeaderMaybe,
|
||||
import Web.HttpApiData (FromHttpApiData, parseHeaderMaybe,
|
||||
parseQueryParamMaybe,
|
||||
parseUrlPieceMaybe,
|
||||
parseUrlPieces)
|
||||
#else
|
||||
import Web.HttpApiData.Internal (parseHeaderMaybe,
|
||||
parseQueryParamMaybe,
|
||||
parseUrlPieceMaybe,
|
||||
parseUrlPieces)
|
||||
#endif
|
||||
|
||||
import Servant.API ((:<|>) (..), (:>), BasicAuth, Capture,
|
||||
CaptureAll, Verb,
|
||||
ReflectMethod(reflectMethod),
|
||||
|
|
|
@ -72,8 +72,7 @@ module Servant.API.ContentTypes
|
|||
|
||||
import Control.Arrow (left)
|
||||
import Control.Monad.Compat
|
||||
import Data.Aeson (FromJSON (..), ToJSON (..),
|
||||
encode)
|
||||
import Data.Aeson (FromJSON(..), ToJSON(..), encode)
|
||||
import Data.Aeson.Parser (value)
|
||||
import Data.Aeson.Types (parseEither)
|
||||
import Data.Attoparsec.ByteString.Char8 (endOfInput, parseOnly,
|
||||
|
@ -288,7 +287,7 @@ instance OVERLAPPABLE_
|
|||
ToJSON a => MimeRender JSON a where
|
||||
mimeRender _ = encode
|
||||
|
||||
-- | @urlEncodeAsForm"
|
||||
-- | @urlEncodeAsForm@
|
||||
-- Note that the @mimeUnrender p (mimeRender p x) == Right x@ law only
|
||||
-- holds if every element of x is non-null (i.e., not @("", "")@)
|
||||
instance OVERLAPPABLE_
|
||||
|
|
Loading…
Reference in a new issue