title: curl PATCH - JSON is sent as Line-based text data
body: <p>Using curl to send a PATCH to my web service and got error:</p>
  
  <pre><code>Bad Request, The request sent by the client was syntactically incorrect. Apache Tomcat/8.0.37
  </code></pre>
  
  <p>while sending GET and POST using curl have no issue.
  Using Swagger sending the same PATCH has no issue. So using WireShark to compare the Swagger (good) case and curl (bad) case.</p>
  
  <p>Swagger (good) case:
  <a href="https://i.stack.imgur.com/LlQua.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LlQua.png" alt="Swagger (good) case"></a></p>
  
  <p>curl (bad) case:
  <a href="https://i.stack.imgur.com/Rbnyb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Rbnyb.png" alt="curl (bad) case"></a></p>
  
  <p>In the good case, a 0xA is inserted after "{" and ",". curl doesn't do this and double quotes are missing. </p>
  
  <p>Here is the Swagger UI:
  <a href="https://i.stack.imgur.com/mOXLU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mOXLU.png" alt="Swagger UI (good)"></a></p>
  
  <p>and this is my curl command running on Windows Command Prompt
  <a href="https://i.stack.imgur.com/zrzvd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zrzvd.png" alt="curl command (bad)"></a></p>
  
  <p>Chrome app ARC also gets OK response:
  <a href="https://i.stack.imgur.com/y0yqZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/y0yqZ.png" alt="enter image description here"></a></p>
  
  <p>Any suggestion is appreciated.</p>