title: beautify cURL download of JSON before writing to file
body: <p>I am using cURL 7.39.0 to call a REST webservice and write the response to a <code>.json</code> file:</p>
  <pre class="lang-none prettyprint-override"><code>curl -L-X POST -b cookies.txt -H &quot;Content-Type: application/json&quot; http://localhost:7001/web/service/url -d {&quot;param1&quot;:&quot;value1&quot;} -o &quot;C:\output\serviceName.json&quot; 
  </code></pre>
  <p>The response is written to the output file, but, without formatting:</p>
  <pre class="lang-json prettyprint-override"><code>{&quot;status&quot;: &quot;success&quot;,&quot;user&quot;: &quot;name&quot;, &quot;regId&quot;: &quot;14420&quot;,&quot;subscriber&quot;: [{&quot;memberFor&quot;:&quot;3 years&quot;,&quot;lastLogin&quot;:&quot;2 days ago&quot;}]}
  </code></pre>
  <p>My questions are:</p>
  <ol>
  <li><p>Is there a way to format the JSON response before writing it to the output file (like below)?</p>
  <pre class="lang-json prettyprint-override"><code>{
      &quot;status&quot;: &quot;success&quot;,
      &quot;user&quot;: &quot;name&quot;,
      &quot;regId&quot;: &quot;14420&quot;,
      &quot;subscriber&quot;: [
          {
              &quot;memberFor&quot;:&quot;3 years&quot;,
              &quot;lastLogin&quot;:&quot;2 days ago&quot;     
          }
      ]
  }
  </code></pre>
  </li>
  <li><p>If formatting is not possible via cURL, I wish to write a simple batch file to automatically open the JSON output file and apply formatting. Something like:</p>
  <pre class="lang-none prettyprint-override"><code>@echo off
  cls
  &quot;C:\Program Files\Notepad++\notepad++&quot; &quot;C:\output\serviceName.json&quot; 
  pause
  </code></pre>
  </li>
  </ol>
  <p>Are there any flags/options available in batch/console to achieve this?</p>