Java Code Examples for io.vertx.core.http.HttpServerRequest#uri()

The following examples show how to use io.vertx.core.http.HttpServerRequest#uri() . 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: TestContextRest.java    From rest.vertx with Apache License 2.0 5 votes vote down vote up
@GET
@Path("/context")
public String getRoute(@Context HttpServerResponse response, @Context HttpServerRequest request) {

	response.setStatusCode(201);
	return request.uri();
}
 
Example 2
Source File: MethodParamInjectionController.java    From nubes with Apache License 2.0 4 votes vote down vote up
@GET("/request")
@ContentType("text/plain")
public String getRequest(HttpServerRequest request) {
	return request.uri();
}
 
Example 3
Source File: HttpServerMetricsImpl.java    From vertx-dropwizard-metrics with Apache License 2.0 4 votes vote down vote up
@Override
public HttpRequestMetric requestBegin(Long socketMetric, HttpServerRequest request) {
  return new HttpRequestMetric(request.method(), request.uri());
}
 
Example 4
Source File: SockJSSession.java    From vertx-web with Apache License 2.0 4 votes vote down vote up
synchronized void register(HttpServerRequest req, TransportListener lst) {
  this.transportCtx = vertx.getOrCreateContext();
  this.localAddress = req.localAddress();
  this.remoteAddress = req.remoteAddress();
  this.uri = req.uri();
  this.headers = BaseTransport.removeCookieHeaders(req.headers());
  if (closed) {
    // Closed by the application
    writeClosed(lst);
    // And close the listener request
    lst.close();
  } else if (this.listener != null) {
    writeClosed(lst, 2010, "Another connection still open");
    // And close the listener request
    lst.close();
  } else {

    cancelTimer();

    this.listener = lst;

    if (!openWritten) {
      writeOpen(lst);
      sockHandler.handle(this);
      handleCalled = true;
    }

    if (listener != null) {
      if (closed) {
        // Could have already been closed by the user
        writeClosed(lst);
        listener = null;
        lst.close();
      } else {
        if (!pendingWrites.isEmpty()) {
          writePendingMessages();
        }
      }
    }
  }
}