Thanks to visit codestin.com
Credit goes to github.com

Skip to content

787971466/http

 
 

Repository files navigation

http Build Status

Lightweight Java http server and web application framework.

Example

Basic route

    HttpServer server = HttpServer.bind(8080);
    server.accept(new Controller() {
        @Get("/")
        public HttpHandler index() {
            return ok();
        }
    });
    server.listen();

Parameterized route

    HttpServer server = HttpServer.bind(8080);
    server.accept(new Controller() {
        @Get("/user/{username}")
        public HttpHandler index(String username) {
            return ok();
        }
    });
    server.listen();

Keep in mind, annotation-based routes can be limiting, as the only supported pattern for parameters is .+. Using the Router directly provides full support for custom regex, parameter ordering, and delegation to any instantiated class and its methods.

About

Lightweight Java http server and web application framework.

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Java 100.0%