Package io.quarkus.vertx.web
Interface RoutingExchange
-
- All Known Implementing Classes:
RoutingExchangeImpl
public interface RoutingExchange
Convenient wrapper ofRoutingContext
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description io.vertx.ext.web.RoutingContext
context()
default Optional<String>
getHeader(CharSequence headerName)
default Optional<String>
getParam(String paramName)
default io.vertx.core.http.HttpServerResponse
notFound()
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
request()
default io.vertx.core.http.HttpServerResponse
response()
default io.vertx.core.http.HttpServerResponse
serverError()
Set the response status code to 500 and return the response.
-
-
-
Method Detail
-
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 callHttpServerResponse.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 callHttpServerResponse.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 callHttpServerResponse.end()
afterwards to end the response.- Returns:
- the HTTP response object
-
-