@hackage http-api-data-qq0.1.0.0

Quasiquoter for building URLs with ToHttpApiData types

http-api-data-qq

CircleCI Hackage Codecov

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