@@ -17,6 +17,7 @@ import Servant.JS
1717import qualified Servant.JS.Vanilla as JS
1818import qualified Servant.JS.JQuery as JQ
1919import qualified Servant.JS.Angular as NG
20+import qualified Servant.JS.Axios as AX
2021import Servant.JSSpec.CustomHeaders
2122
2223type TestAPI = "simple" :> ReqBody '[JSON,FormUrlEncoded] String :> Post '[JSON] Bool
@@ -55,6 +56,8 @@ data TestNames = Vanilla
5556 | JQueryCustom
5657 | Angular
5758 | AngularCustom
59+ | Axios
60+ | AxiosCustom
5861 deriving (Show, Eq)
5962
6063customOptions :: CommonGeneratorOptions
@@ -71,6 +74,8 @@ spec = describe "Servant.JQuery" $ do
7174 generateJSSpec JQueryCustom (JQ.generateJQueryJSWith customOptions)
7275 generateJSSpec Angular (NG.generateAngularJS NG.defAngularOptions)
7376 generateJSSpec AngularCustom (NG.generateAngularJSWith NG.defAngularOptions customOptions)
77+ generateJSSpec Axios AX.generateAxiosJS
78+ generateJSSpec AxiosCustom (AX.generateAxiosJSWith customOptions)
7479
7580 angularSpec Angular
7681 angularSpec AngularCustom
@@ -143,7 +148,7 @@ generateJSSpec n gen = describe specLabel $ do
143148 parseFromString jsStr `shouldSatisfy` isRight
144149 where
145150 specLabel = "generateJS(" ++ (show n) ++ ")"
146− output _ = return ()
151+ output = putStrLn
147152 genJS req = gen req
148153 header :: TestNames -> String -> String -> String
149154 header v headerName headerValue