@@ -33,7 +33,11 @@ import Network.HTTP.Types (Status (..), hAccept, hContentType,
3333 methodDelete, methodGet,
3434 methodHead, methodPatch,
3535 methodPost, methodPut, ok200,
36+#if MIN_VERSION_http_types(0,10,0)
37+ imATeapot418,
38+#else
3639 imATeaPot418,
40+#endif
3741 parseQuery)
3842import Network.Wai (Application, Request, requestHeaders, pathInfo,
3943 queryString, rawQueryString,
@@ -70,6 +74,11 @@ import Servant.Server.Experimental.Auth
7074import Servant.Server.Internal.Context
7175 (NamedContext(..))
7276
77+#if !MIN_VERSION_http_types(0,10,0)
78+imATeapot418 :: Status
79+imATeapot418 = imATeaPot418
80+#endif
81+
7382-- * comprehensive api test
7483
7584-- This declaration simply checks that all instances are in place.
@@ -662,7 +671,7 @@ basicAuthApi = Proxy
662671basicAuthServer :: Server BasicAuthAPI
663672basicAuthServer =
664673 const (return jerry) :<|>
665− (Tagged $ \ _ respond -> respond $ responseLBS imATeaPot418 [] "")
674+ (Tagged $ \ _ respond -> respond $ responseLBS imATeapot418 [] "")
666675
667676basicAuthContext :: Context '[ BasicAuthCheck () ]
668677basicAuthContext =
@@ -707,7 +716,7 @@ genAuthApi = Proxy
707716
708717genAuthServer :: Server GenAuthAPI
709718genAuthServer = const (return tweety)
710− :<|> (Tagged $ \ _ respond -> respond $ responseLBS imATeaPot418 [] "")
719+ :<|> (Tagged $ \ _ respond -> respond $ responseLBS imATeapot418 [] "")
711720
712721type instance AuthServerData (AuthProtect "auth") = ()
713722