Java Code Examples for io.vertx.core.http.HttpMethod#equals()
The following examples show how to use
io.vertx.core.http.HttpMethod#equals() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: VertxHttpResponse.java From quarkus with Apache License 2.0 | 5 votes |
public VertxHttpResponse(HttpServerRequest request, ResteasyProviderFactory providerFactory, final HttpMethod method, BufferAllocator allocator, VertxOutput output) { outputHeaders = new MultivaluedMapImpl<String, Object>(); this.method = method; os = (method == null || !method.equals(HttpMethod.HEAD)) ? new VertxOutputStream(this, allocator) : null; this.request = request; this.response = request.response(); this.providerFactory = providerFactory; this.output = output; }
Example 2
Source File: RestApiTestBase.java From vertx-postgresql-starter with MIT License | 5 votes |
protected void mockServer(int port, HttpMethod httpMethod, String routingPath, Handler<RoutingContext> handler, TestContext testContext) { vertx = new Vertx(rule.vertx()); router = Router.router(vertx); if (httpMethod.equals(HttpMethod.POST) || httpMethod.equals(HttpMethod.PUT)) { router.route().handler(BodyHandler.create()); } router.route(httpMethod, routingPath).handler(handler); vertx.createHttpServer().requestHandler(router::accept).listen(port, testContext.asyncAssertSuccess()); }