Quasiquoter for building URLs with ToHttpApiData types

Version on this page:
LTS Haskell 22.28:
Stackage Nightly 2024-07-13:
Latest on Hackage:

See all snapshots http-api-data-qq appears in

BSD-3-Clause licensed
Maintained by Brandon Chinn
This version can be pinned in stack with:http-api-data-qq-,1741

Module documentation for


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|{userId}|]
  response <- httpLbs request manager
  print response



  • Initial release