com.vtence.molecule.middlewares.NotFound Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of molecule Show documentation
Show all versions of molecule Show documentation
A web micro-framework for Java
package com.vtence.molecule.middlewares;
import com.vtence.molecule.Application;
import com.vtence.molecule.Request;
import com.vtence.molecule.Response;
import static com.vtence.molecule.http.HttpStatus.NOT_FOUND;
import static com.vtence.molecule.http.MimeTypes.TEXT;
public class NotFound implements Application {
public void handle(Request request, Response response) throws Exception {
response.status(NOT_FOUND)
.contentType(TEXT)
.body("Not found: " + request.path())
.done();
}
}