use of io.vertx.rxjava.core.http.HttpServer in project vertx-examples by vert-x3.
the class Server method start.
@Override
public void start() throws Exception {
HttpServer server = vertx.createHttpServer();
server.requestStream().toObservable().subscribe(req -> {
req.response().putHeader("content-type", "text/html").end("<html><body><h1>Hello from vert.x!</h1></body></html>");
});
server.listen(8080);
}
use of io.vertx.rxjava.core.http.HttpServer in project vertx-examples by vert-x3.
the class Server method start.
@Override
public void start() throws Exception {
HttpServer server = vertx.createHttpServer();
server.requestStream().toObservable().subscribe(req -> {
req.response().putHeader("content-type", "application/json").end("{\"message\":\"Hello World\"}");
});
server.listen(8080);
}
use of io.vertx.rxjava.core.http.HttpServer in project vertx-examples by vert-x3.
the class Server method start.
@Override
public void start() throws Exception {
HttpServer server = vertx.createHttpServer();
server.requestStream().toObservable().subscribe(req -> {
req.response().putHeader("content-type", "application/json").end("{\"message\":\"Hello World\"}");
});
server.listen(8080);
}
Aggregations