Example usage for org.springframework.web.reactive.function.client ClientResponse headers

List of usage examples for org.springframework.web.reactive.function.client ClientResponse headers

Introduction

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

Prototype

Headers headers();

Source Link

Document

Return the headers of this response.

Usage

From source file:org.springframework.cloud.function.web.source.HttpSupplier.java

private Object message(ClientResponse response, Object payload) {
    if (!this.props.getSource().isIncludeHeaders()) {
        return payload;
    }//from www .  java 2 s .c  o  m
    return MessageBuilder.withPayload(payload)
            .copyHeaders(HeaderUtils.fromHttp(HeaderUtils.sanitize(response.headers().asHttpHeaders())))
            .build();
}