Interface RoutingExchange

All Known Implementing Classes:
RoutingExchangeImpl

public interface RoutingExchange
Convenient wrapper of RoutingContext.
  • Method Summary

    Modifier and Type
    Method
    Description
    io.vertx.ext.web.RoutingContext
     
    default Optional<String>
    getHeader(CharSequence headerName)
     
    default Optional<String>
    getParam(String paramName)
     
    default io.vertx.core.http.HttpServerResponse
    Set the response status code to 404 and return the response.
    default io.vertx.core.http.HttpServerResponse
    ok()
    Set the response status code to 200 and return the response.
    default void
    ok(String chunk)
    Set the response status code to 200, write a chunk of data to the response then ends it.
    default io.vertx.core.http.HttpServerRequest
     
    default io.vertx.core.http.HttpServerResponse
     
    default io.vertx.core.http.HttpServerResponse
    Set the response status code to 500 and return the response.
  • Method Details

    • context

      io.vertx.ext.web.RoutingContext context()
      Returns:
      the underlying Vert.x routing context.
    • request

      default io.vertx.core.http.HttpServerRequest request()
      Returns:
      the HTTP request object
    • getParam

      default Optional<String> getParam(String paramName)
      Parameters:
      paramName -
      Returns:
      the request parameter
      See Also:
      • HttpServerRequest.getParam(String)
    • getHeader

      default Optional<String> getHeader(CharSequence headerName)
      Parameters:
      headerName -
      Returns:
      the first header value with the specified name
      See Also:
      • HttpServerRequest.getHeader(CharSequence)
    • response

      default io.vertx.core.http.HttpServerResponse response()
      Returns:
      the HTTP response object
    • ok

      default io.vertx.core.http.HttpServerResponse ok()
      Set the response status code to 200 and return the response. You must call HttpServerResponse.end() afterwards to end the response.
      Returns:
      the HTTP response object
    • ok

      default void ok(String chunk)
      Set the response status code to 200, write a chunk of data to the response then ends it.
      Parameters:
      chunk -
    • serverError

      default io.vertx.core.http.HttpServerResponse serverError()
      Set the response status code to 500 and return the response. You must call HttpServerResponse.end() afterwards to end the response.
      Returns:
      the HTTP response object
    • notFound

      default io.vertx.core.http.HttpServerResponse notFound()
      Set the response status code to 404 and return the response. You must call HttpServerResponse.end() afterwards to end the response.
      Returns:
      the HTTP response object