proc addRoute*(self: Server, httpMethod, route: string, handler:
proc(request: Request) {.cdecl.}) =
discard
Run
Well, it works, thanks :)
proc(param1: typ1, param2: typ2), to be exact it depends on the parameters of
the procedure.
See also:
[https://nim-lang.org/docs/manual.html#types-procedural-type](https://nim-lang.org/docs/manual.html#types-procedural-type)
Hello vbxx3,
I am new to Nim but I think what you are looking for is called **procedural
types**.
You can find some information about them in the [Nim
tutorial](https://nim-lang.org/docs/tut1.html#advanced-types-procedural-type)
and in the
proc addRoute*(self: Server, httpMethod, route: string, handler: ???)
discard
Run
What type do I need to set to pass the procedure as a handler?