title: HTTP Outbound Gateway - Passing URI parameters
body: <p>I need to invoke a REST API via Spring Integration's HTTP outbound gateway. How do I substitute the path variable with a value from payload. Payload has just one String value. The following code snippet is sending the place holder as such. Any help is appreciated.</p>
  
  <pre><code>@Bean
  public MessageHandler   httpGateway(@Value("http://localhost:8080/api/test-resource/v1/{parameter1}/codes") URI uri) {
      HttpRequestExecutingMessageHandler httpHandler = new HttpRequestExecutingMessageHandler(uri);
      httpHandler.setExpectedResponseType(Map.class);
      httpHandler.setHttpMethod(HttpMethod.GET);
      Map&lt;String, Expression&gt; uriVariableExp = new HashMap();
  
      SpelExpressionParser parser = new SpelExpressionParser();
  
      uriVariableExp.put("parameter1", parser.parseExpression("payload.Message"));
      httpHandler.setUriVariableExpressions(uriVariableExp);
      return httpHandler;
  }
  </code></pre>