Using curl with a --config file
<p>I've been making curl requests to a long URL and saved the URL in a file named "url.txt".  I then query that URL using the following command...</p>

<p><a href="http://curl.haxx.se/docs/manpage.html#-K" rel="nofollow">http://curl.haxx.se/docs/manpage.html#-K</a></p>

<pre><code>curl -K ../url.txt
</code></pre>

<p>The <code>url.txt</code> file in this case contains the data which is in the following format...</p>

<pre><code>url = "http://mycustomurl.com/index.json?param1=hello,param2=world...
</code></pre>

<p>The url gets quite long.  I also wanted to pass headers with that file, which I can pass using <code>-H</code> flag as well.  However, when using these two flags together, they do not seem to work as far as I can tell.  Therefore, I'm trying to modify my <code>url.txt</code> file to take the following format, and just use the first <code>curl</code> statement.</p>

<pre><code>header = "Accept: application/json"
url = "http://mycustomurl.com/index.json?param1=hello,param2=world...
</code></pre>

<p>The query still functions and returns the body of the page, but the header is not being properly passed to the server.  I've checked my server logs to confirm.  Is anyone able to shed any light on what I may be doing wrong in this instance?  Any help would be greatly appreciated.</p>

<p>Thank you.</p>