function flickr_curl_set_headers in Flickr 7
Set default headers in curl object.
Parameters
array $options [reference]: Options array
object $ch [reference]: cURL Object
1 call to flickr_curl_set_headers()
- flickr_curl_http_request in ./
flickr.inc - Performs an HTTP request over cURL. Taken from http://cgit.drupalcode.org/chr/tree/chr.module.
File
- ./
flickr.inc, line 2092 - The Flickr API functions.
Code
function flickr_curl_set_headers(&$options, &$ch) {
if (is_array($options['headers']) and !empty($options['headers'])) {
$headers = array();
foreach ($options['headers'] as $key => $value) {
$headers[] = trim($key) . ": " . trim($value);
}
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
}
}