Java Intro to Java Web Development with Spark Diving into Web Development Accepting Requests

Mojo Waters
Mojo Waters
5,748 Points

post not visible

Hi guys, My spark doesn't see post() neither req, res. I have it imported, but I am not that lucky like Craig with API. Can it be like a intellij version thing or something? And it always wants to import HTTPMethod.post - Spark. post I just manually added. Please help

import spark.ModelAndView; import spark.template.handlebars.HandlebarsTemplateEngine;

import static spark.Spark.get; import static spark.Spark.post; import static spark.route.HttpMethod.post;

public class Main {

public static void main(String[] args) {


    get("/",(req,res) -> {
            return new ModelAndView(null, "index.hbs");
    }, new HandlebarsTemplateEngine());
}

    post("/sign-in",(req,res) - > )

}

Mojo Waters
Mojo Waters
5,748 Points

I am sorry, I found a problem. Stupid Mustache that's all it was. sorry for bothering. Thanks!