module Main where

import qualified Network.Shelob as HTTP
import qualified Network.Shelob.Types as HTTP
import           Text.Show.Pretty

main :: IO ()
main = do
  conn <- HTTP.httpConnection "gdritter.com"

  r0 <- HTTP.makeRequest conn $
    HTTP.head "/index.html" [HTTP.Header "Host" "gdritter.com"]
  pPrint r0

  r1 <- HTTP.makeRequest conn $
    HTTP.get "/index.html" [HTTP.Header "Host" "gdritter.com"]
  pPrint r1

  r2 <- HTTP.makeRequest conn $
    HTTP.get "/matzo/matzo.html" [HTTP.Header "Host" "gdritter.com"]
  pPrint r2

  HTTP.connClose conn
  return ()
