Example usage for org.springframework.integration.http.outbound HttpRequestExecutingMessageHandler setHttpMethod

List of usage examples for org.springframework.integration.http.outbound HttpRequestExecutingMessageHandler setHttpMethod

Introduction

In this page you can find the example usage for org.springframework.integration.http.outbound HttpRequestExecutingMessageHandler setHttpMethod.

Prototype

public void setHttpMethod(HttpMethod httpMethod) 

Source Link

Document

Specify the HttpMethod for requests.

Usage

From source file:com.acmemotors.batch.LoaderJobConfiguration.java

@Bean
@ServiceActivator(inputChannel = "requestChannel")
public HttpRequestExecutingMessageHandler messageHandler(@Value("${serverUrl}") String serverUrl) {
    HttpRequestExecutingMessageHandler handler = new HttpRequestExecutingMessageHandler(serverUrl);
    handler.setHttpMethod(HttpMethod.POST);
    handler.setExpectedResponseType(String.class);

    return handler;
}