It's not clearly specified whether to use an array with formatted headers or an associative array (ala HttpRequest::addHeaders()) and I figure this is worth an example for clarity.

Cheers,
Patrick
Index: reference/curl/functions/curl-setopt.xml
===================================================================
--- reference/curl/functions/curl-setopt.xml	(revision 298223)
+++ reference/curl/functions/curl-setopt.xml	(working copy)
@@ -1062,7 +1062,10 @@
           <row>
            <entry valign="top"><constant>CURLOPT_HTTPHEADER</constant></entry>
            <entry valign="top">
-            An array of HTTP header fields to set.
+            An array of HTTP header fields to set, in the format
+            <code>
+             array('Content-type: text/plain', 'Content-length: 100')
+            </code>
            </entry>
            <entry valign="top">
            </entry>

Reply via email to