Example usage for org.springframework.web.reactive.function.server ServerResponse headers

List of usage examples for org.springframework.web.reactive.function.server ServerResponse headers

Introduction

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

Prototype

HttpHeaders headers();

Source Link

Document

Return the headers of this response.

Usage

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

private Mono<? extends Void> write(ServerWebExchange exchange, ServerResponse response) {
    // force content-type since writeTo won't overwrite response header values
    exchange.getResponse().getHeaders().setContentType(response.headers().getContentType());
    return response.writeTo(exchange, new ResponseContext());
}