Last active
January 27, 2017 11:02
-
-
Save dcastro/ffea08aa8b1b8bccd5f0ebccbb936546 to your computer and use it in GitHub Desktop.
Using purescript-affjax in psci
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- npm i xhr2 --save | |
import Prelude | |
import Control.Monad.Aff | |
import Control.Monad.Eff.Console | |
import Network.HTTP.Affjax | |
void $ runAff logShow (\x -> log x.response) (get "https://httpbin.org/ip" :: Affjax (console :: CONSOLE) String) | |
void $ runAff logShow (\x -> log (x.response :: String)) (get "https://httpbin.org/ip") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment