我正在使用 Affjax 和launchAff
.
import Network.HTTP.Affjax as Affjax
import Control.Monad.Aff (launchAff)
test1 = launchAff $ do Affjax.get "/api"
这给了我以下错误
58 test1 = launchAff $ do Affjax.get "/api"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
No type class instance was found for
Network.HTTP.Affjax.Response.Respondable _0
The instance head contains unknown type variables. Consider adding a type annotation.
in value declaration test1
where _0 is an unknown type
我知道Respondable
需要在这里定义,但我真的不知道该怎么做。
任何帮助是极大的赞赏。
谢谢