All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.vtence.molecule.middlewares.NotFound Maven / Gradle / Ivy

There is a newer version: 0.15.0
Show newest version
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();

    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy