Skip to content

Instantly share code, notes, and snippets.

@cblp
Last active March 23, 2019 12:08
Show Gist options
  • Save cblp/47efade711eb581450c71ffa4ff47e4c to your computer and use it in GitHub Desktop.
Save cblp/47efade711eb581450c71ffa4ff47e4c to your computer and use it in GitHub Desktop.
#!/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