Imported Upstream version 7.44.0
[platform/upstream/curl.git] / docs / libcurl / opts / CURLOPT_HEADER.html
index 7cbb9d3..23f0204 100644 (file)
@@ -4,15 +4,20 @@
 <title>CURLOPT_HEADER man page</title>
 <meta name="generator" content="roffit">
 <STYLE type="text/css">
-P.level0 {
+pre {
+  overflow: auto;
+  margin: 0;
+}
+
+P.level0, pre.level0 {
  padding-left: 2em;
 }
 
-P.level1 {
+P.level1, pre.level1 {
  padding-left: 4em;
 }
 
-P.level2 {
+P.level2, pre.level2 {
  padding-left: 6em;
 }
 
@@ -47,13 +52,27 @@ p.roffit {
 
 <p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
 <p class="level0">CURLOPT_HEADER - pass headers to the data stream <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0">#include &lt;curl/curl.h&gt; 
+<p class="level0">&#35;include &lt;curl/curl.h&gt; 
 <p class="level0">CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HEADER, long onoff); <a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
 <p class="level0">Pass in <span Class="emphasis">onoff</span> set to 1 to tell the library to include the header in the body output for requests with this <span Class="emphasis">handle</span>. This option is relevant for protocols that actually have headers or other meta-data (like HTTP and FTP). 
 <p class="level0">When asking to get the header info passed to the same callback as the body, it is not possible to accurately separate them again without detailed knowledge about the protocol in use. 
-<p class="level0">It is often better to use <a Class="emphasis" href="./CURLOPT_HEADERFUNCTION.html">CURLOPT_HEADERFUNCTION</a> to get the header data separately. <a name="DEFAULT"></a><h2 class="nroffsh">DEFAULT</h2>
-<p class="level0">0 <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
+<p class="level0">It is often better to use <a Class="emphasis" href="./CURLOPT_HEADERFUNCTION.html">CURLOPT_HEADERFUNCTION</a> to get the header data separately. 
+<p class="level0">While named confusingly similar, <a Class="emphasis" href="./CURLOPT_HTTPHEADER.html">CURLOPT_HTTPHEADER</a> is used to set custom HTTP headers! <a name="DEFAULT"></a><h2 class="nroffsh">DEFAULT</h2>
+<p class="level0">0 <a name="PROTOCOLS"></a><h2 class="nroffsh">PROTOCOLS</h2>
+<p class="level0">Most <a name="EXAMPLE"></a><h2 class="nroffsh">EXAMPLE</h2>
+<p class="level0"><pre class="level0">
+CURL *curl = curl_easy_init();
+if(curl) {
+&nbsp; curl_easy_setopt(curl, CURLOPT_URL, "<a href="http://example.com">http://example.com</a>");
+&nbsp;
+&nbsp; curl_easy_setopt(curl, CURLOPT_HEADER, 1L);
+&nbsp;
+&nbsp; curl_easy_perform(curl);
+}
+</pre>
+
+<p class="level0"><a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
 <p class="level0">Returns CURLE_OK. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a Class="manpage" href="./CURLOPT_HEADERFUNCTION.html">CURLOPT_HEADERFUNCTION</a>, <span Class="manpage"> </span> <p class="roffit">
+<p class="level0"><a Class="manpage" href="./CURLOPT_HEADERFUNCTION.html">CURLOPT_HEADERFUNCTION</a>, <span Class="manpage"> </span> <a Class="manpage" href="./CURLOPT_HTTPHEADER.html">CURLOPT_HTTPHEADER</a>, <span Class="manpage"> </span> <p class="roffit">
  This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
 </body></html>