init() {
    // Register API and plugin routes
    const routes = [
      ...global.kuzzle.config.http.routes,
      ...global.kuzzle.pluginsManager.routes,
    ];

    this.http.post("_query", (request, cb) => {
      // We need to build a new request from the body
      // and we also need to keep the original request context
      const requestPayload = request.input.body;

      if (request.input.jwt && requestPayload.jwt === undefined) {
        requestPayload.jwt = request.input.jwt;
      }

      const apiRequest = new Request(
        requestPayload,
        request.serialize().options,
      );

      this._executeFromHttp("post", apiRequest, cb);
    });

    this.http.get("_healthcheck", (request, cb) => {
      request.response.configure({
        status: 200,
      });

      /**
       * By avoiding using the funnel, we avoid the request to be logged
       * This is useful for ochestrators healthchecks
       */
      cb(request);
    });

    this.http.get("_ready", (request, cb) => {
      let status = 200;

      if (
        global.kuzzle.state !== kuzzleStateEnum.RUNNING ||
        global.kuzzle.funnel.overloaded
      ) {
        status = 503;
      }

      request.response.configure({
        status: status,
      });

      /**
       * By avoiding using the funnel, we avoid the request to be logged
       * This is useful for ochestrators healthchecks
       */
      cb(request);
    });

    for (const route of routes) {
      const verb = route.verb.toLowerCase();

      this.http[verb](route.path, (request, cb) => {
        request.input.controller = route.controller;
        request.input.action = route.action;

        if (route.deprecated) {
          const {
            deprecated: { since, message },
          } = route;
          request.addDeprecation(since, message);
        }

        this._executeFromHttp(route.verb, request, cb);
      });
    }

    /**
     * Returns inner metrics from the router
     * @returns {Object}
     */
    global.kuzzle.onAsk("core:network:router:metrics", () => this.metrics());
  }
Initializes the HTTP routes for the Kuzzle HTTP API.