1

In my Yesod app I have a route defined as

/bookings/#BookingId/review-data BookingReviewDataR GET

I need to pass the route to the frontend of the application in such a way that the frontend could call the endpoint for any user defined BookingId.

Is there something similar to getUrlRender to retrieve from Yesod a string representation of the route with a placeholder instead of a BookingId?

marcosh
  • 8,780
  • 5
  • 44
  • 74
  • so what should be the outcome, the path with the hash sign (`#`), so `"/bookings/#BookingId/review-data"`? – Willem Van Onsem Aug 31 '23 at 14:03
  • @WillemVanOnsem something like that, yes, or maybe the placeholder could be customised – marcosh Aug 31 '23 at 14:13
  • Probably a duplicate of my own old question: https://stackoverflow.com/questions/19046988/yesod-using-typesafe-urls-in-ajax-calls – arrowd Sep 01 '23 at 06:59

0 Answers0