Example usage for org.springframework.data.rest.webmvc IncomingRequest getServerHttpRequest

List of usage examples for org.springframework.data.rest.webmvc IncomingRequest getServerHttpRequest

Introduction

In this page you can find the example usage for org.springframework.data.rest.webmvc IncomingRequest getServerHttpRequest.

Prototype

public ServerHttpRequest getServerHttpRequest() 

Source Link

Document

Returns the underlying ServerHttpRequest .

Usage

From source file:org.springframework.data.rest.webmvc.config.PersistentEntityResourceHandlerMethodArgumentResolver.java

private Object read(IncomingRequest request, HttpMessageConverter<Object> converter,
        RootResourceInformation information) {

    try {/*from w ww  .  j av  a  2  s . c  o m*/
        return converter.read(information.getDomainType(), request.getServerHttpRequest());
    } catch (IOException o_O) {
        throw new HttpMessageNotReadableException(String.format(ERROR_MESSAGE, information.getDomainType()),
                o_O);
    }
}