Last active
March 23, 2019 12:08
-
-
Save cblp/47efade711eb581450c71ffa4ff47e4c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/usr/bin/env stack | |
-- stack --resolver=lts-13.10 script | |
{-# LANGUAGE OverloadedStrings #-} | |
import Data.Default | |
import Network.HTTP.Req | |
main :: IO () | |
main = do | |
-- 1 | |
runReq def $ req POST (https "ya.ru") NoReqBody ignoreResponse mempty | |
-- 2 | |
let Just (url, options) = parseUrlHttps "https://ya.ru/" | |
runReq def $ req POST url NoReqBody ignoreResponse options | |
-- | |
pure () |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment