<@U3W8YSSSV> Please post your entire code so we ca...
# getting-started
k
@tipsy Please post your entire code so we can see what going on.
t
Copy code
get("/hello") { MyClass::myFunc }

class MyClass {
    fun myFunc(ctx: Context) {
        ctx.result("Hello World")
    }
}

//get signature: 
get(String path, Handler handler)
// Handler: 
@FunctionalInterface
public interface Handler {
    void handle(Context ctx) throws Exception;
}
k
@tipsy Yea that just means get("/hello") just never calls the passed lambda.
t
so how do i actually call it?
i
@tipsy
get("/hello") { MyClass::myFunc }
this way you're passing a lambda which gets the reference and then does nothing. You should pass the reference itself instead of the lambda:
get("/hello", MyClass::myFunc)
t
hah, i feel stupid now
makes perfect sense, thanks