servant-js-0.5: Automatically derive javascript functions to query servant webservices.

Safe HaskellNone
LanguageHaskell2010

Servant.JS.Axios

Synopsis

Documentation

data AxiosOptions

Axios configuration type Let you customize the generation using Axios capabilities

Constructors

AxiosOptions 

Fields

withCredentials :: !Bool

indicates whether or not cross-site Access-Control requests should be made using credentials

xsrfCookieName :: !(Maybe Text)

the name of the cookie to use as a value for xsrf token

xsrfHeaderName :: !(Maybe Text)

the name of the header to use as a value for xsrf token

defAxiosOptions :: AxiosOptions

Default instance of the AxiosOptions Defines the settings as they are in the Axios documentation by default

axios :: AxiosOptions -> JavaScriptGenerator

Generate regular javacript functions that use the axios library, using default values for CommonGeneratorOptions.

axiosWith :: AxiosOptions -> CommonGeneratorOptions -> JavaScriptGenerator

Generate regular javascript functions that use the axios library.

generateAxiosJS :: AxiosOptions -> AjaxReq -> Text

js codegen using axios library using default options

generateAxiosJSWith :: AxiosOptions -> CommonGeneratorOptions -> AjaxReq -> Text

js codegen using axios library