Created
June 30, 2017 17:46
-
-
Save furu/6260e2c0003f9932fab125bf1b2a10c0 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
{-# LANGUAGE OverloadedStrings #-} | |
import Network.HTTP.Simple | |
main :: IO () | |
main = do | |
resp <- httpLBS "HEAD https://httpbin.org/get" | |
putStrLn $ "Status: " ++ show (getResponseStatus resp) | |
putStrLn $ "Headers: " ++ show (getResponseHeaders resp) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
httpNoBody というのがあって HEAD メソッドを送るのかと思ったけど、そうではなく、ただリクエストボディを無視して、() を返すだけだった。