smart-http is aProgrammable HTTP Application Microkernel. It is currently one of the few Http servers on the market that strictly abides by the RFC2616 specification and takes into account excellent performance.

smart-http is completely built on the self-developed communication framework smart-socket, maintaining its pure localized lineage. The target of the project positioning is nginx, and high performance and lightweight are the goals it pursues and persists in.

Strictly speaking, smart-http is not a framework, it is more like a tool library. Based on it, developers can package application frameworks or solutions that fit specific scenarios.

module introduction

module illustrate amount of code
smart-http-common Basic common modules, including enumeration, logging, tool classes 2300+
smart-http-client HTTP Client Codec and Responsive Programming Design 1200+
smart-http-server Codec and application layer interface design of HTTP Server and WebSocket 2600+
smart-http-restful Simple version of MVC module based on smart-http-server (experimental) 380+
smart-http-test Single test module 1200+

2. Version update



This update:

  1. smart-socket upgraded to 1.6.1.

  2. HttpRouteHandler supports custom default handler.

  3. New features of the restful module:

3. Get started quickly

3.1 HTTP server

public class SimpleSmartHttp {
    public static void main(String[] args) {
        HttpBootstrap bootstrap = new HttpBootstrap();
        bootstrap.httpHandler(new HttpServerHandler() {
            public void handle(HttpRequest request, HttpResponse response) throws IOException {
                response.write("hello smart-http<br/>".getBytes());

3.2 WebSocket server

public class WebSocketDemo {
    public static void main(String[] args) {
        WebSocketRouteHandler routeHandle = new WebSocketRouteHandler();

        routeHandle.route("/", new WebSocketDefaultHandler() {
            public void handleTextMessage(WebSocketRequest request, WebSocketResponse response, String data) {

        HttpBootstrap bootstrap = new HttpBootstrap();

3.3 Http client

public class HttpGetDemo {
    public static void main(String[] args) {
        HttpClient httpClient = new HttpClient("", 80);
                .onSuccess(response -> System.out.println(response.body()))

3.4 Restful


public class RestfulDemo {

    @RequestMapping(value = "/hello", method = RequestMethod.GET)
    public String helloworld() {
        return "hello world";

    public static void main(String[] args) throws Exception {
        RestfulBootstrap bootstrap = RestfulBootstrap.getInstance().controller(RestfulDemo.class);

The smartboot open source organization is a low-key organization that is easily mistaken for “reinventing the wheel”.had won 2020 OSC China Open Source Project “Excellent Gitee Organization”honor.

Star projects within the organization include:

  • smart-socket
    It took 5 years to refine more than 2,000 lines of code, and easily realize the AIO communication framework with millions of long connections.

  • smart-http
    HTTP/1.1 web service implemented based on smart-socket.

  • smart-servlet
    Servlet 3.1 container service implemented based on smart-http.

  • smart-broker
    MQTT 3.1.1/5.0 Broker service implemented based on smart-socket.

  • smart-flow
    A lightweight business orchestration framework with observability.

Organization address:
Code repository:

#smarthttp #v1120 #release #News Fast Delivery

Leave a Comment

Your email address will not be published. Required fields are marked *