Example usage for org.springframework.web.reactive.function.server ServerRequest methodName

List of usage examples for org.springframework.web.reactive.function.server ServerRequest methodName

Introduction

In this page you can find the example usage for org.springframework.web.reactive.function.server ServerRequest methodName.

Prototype

String methodName();

Source Link

Document

Get the name of the HTTP method.

Usage

From source file:org.springframework.boot.autoconfigure.web.reactive.error.AbstractErrorWebExceptionHandler.java

private String formatError(Throwable ex, ServerRequest request) {
    String reason = ex.getClass().getSimpleName() + ": " + ex.getMessage();
    return "Resolved [" + reason + "] for HTTP " + request.methodName() + " " + request.path();
}

From source file:org.springframework.boot.autoconfigure.web.reactive.error.AbstractErrorWebExceptionHandler.java

private String formatRequest(ServerRequest request) {
    String rawQuery = request.uri().getRawQuery();
    String query = StringUtils.hasText(rawQuery) ? "?" + rawQuery : "";
    return "HTTP " + request.methodName() + " \"" + request.path() + query + "\"";
}