Description
Quasiquoter for building URLs with ToHttpApiData types.
Description
Quasiquoter for building URLs with strings interpolated using ToHttpApiData instances
README.md
http-api-data-qq
Quasiquoter for building URLs with strings interpolated using ToHttpApiData
instances.
{-# LANGUAGE QuasiQuotes #-}
import Network.HTTP.Client
import Web.HttpApiData.QQ (url)
userId :: Int
userId = 100
main :: IO ()
main = do
manager <- newManager defaultManagerSettings
request <- parseRequest [url|http://httpbin.org/anything/user/#{userId}|]
response <- httpLbs request manager
print response