title: How to send HTTP OPTIONS request with body using Spring rest template?
body: <p>I am trying to call a RESTfull web service resource, this resource is provided by a third party, the resource is exposed with OPTIONS http verb.</p>
  
  <p>To integrate with the service, I should send a request with a specific body, which identities by a provider, but when I did that I got a bad request. After that I trace my code then I recognized that the body of the request is ignored by rest template based on the below code:</p>
  
  <pre><code>if ("POST".equals(httpMethod) || "PUT".equals(httpMethod) ||
              "PATCH".equals(httpMethod) || "DELETE".equals(httpMethod)) {
          connection.setDoOutput(true);
      }
      else {
          connection.setDoOutput(false);
      }
  </code></pre>
  
  <p>my question, is there a standard way to override this behavior or I should use another tool?</p>