Example usage for org.springframework.integration.http.support DefaultHttpHeaderMapper setOutboundHeaderNames

List of usage examples for org.springframework.integration.http.support DefaultHttpHeaderMapper setOutboundHeaderNames

Introduction

In this page you can find the example usage for org.springframework.integration.http.support DefaultHttpHeaderMapper setOutboundHeaderNames.

Prototype

public void setOutboundHeaderNames(String... outboundHeaderNames) 

Source Link

Document

Provide the header names that should be mapped to an HTTP request (for outbound adapters) or HTTP response (for inbound adapters) from a Spring Integration Message's headers.

Usage

From source file:org.springframework.integration.http.support.DefaultHttpHeaderMapper.java

/**
 * Factory method for creating a basic outbound mapper instance.
 * This will map all standard HTTP request headers when sending an HTTP request,
 * and it will map all standard HTTP response headers when receiving an HTTP response.
 *//*from w w w.  ja  va  2  s .  co  m*/
public static DefaultHttpHeaderMapper outboundMapper() {
    DefaultHttpHeaderMapper mapper = new DefaultHttpHeaderMapper();
    mapper.setOutboundHeaderNames(HTTP_REQUEST_HEADER_NAMES);
    mapper.setInboundHeaderNames(HTTP_RESPONSE_HEADER_NAMES);
    mapper.setExcludedOutboundStandardRequestHeaderNames(HTTP_REQUEST_HEADER_NAMES_OUTBOUND_EXCLUSIONS);
    return mapper;
}

From source file:org.springframework.integration.http.support.DefaultHttpHeaderMapper.java

/**
 * Factory method for creating a basic inbound mapper instance.
 * This will map all standard HTTP request headers when receiving an HTTP request,
 * and it will map all standard HTTP response headers when sending an HTTP response.
 *//*from   w  ww.j a v  a 2 s .  c  o  m*/
public static DefaultHttpHeaderMapper inboundMapper() {
    DefaultHttpHeaderMapper mapper = new DefaultHttpHeaderMapper();
    mapper.setInboundHeaderNames(HTTP_REQUEST_HEADER_NAMES);
    mapper.setOutboundHeaderNames(HTTP_RESPONSE_HEADER_NAMES);
    mapper.setExcludedInboundStandardResponseHeaderNames(HTTP_RESPONSE_HEADER_NAMES_INBOUND_EXCLUSIONS);
    return mapper;
}