A question about EndPoint: how can I get the url - let's say "/about" - from the EndPoint (e.g EndPoint.About) ? I'm asking because I want to share the EndPoint definition between Server and Client, so that I can define them in a common part (e.g. the Remoting.fs file) and then I want to get the url for the a ref in the Doc produced in the Client.fs. In that case I could use the EndPoint instead of the string in the function (|==>) above Is it possible to do that in F#?

Thank you!

By on 7/26/2019 1:53 AM ()

ctx.Link gives you the URL from an endpoint, where ctx is the serving context.

By on 7/26/2019 3:15 AM ()

Ok, I see.

1
2

let HomePage (ctx:Context<EndPoint>) =
let  url = ctx.Link EndPoint.Table

Yeah, it works, ok, thank you

By on 7/26/2019 4:30 AM ()