CURLOPT_HTTPHEADER

curl option for request headers.

Target constant

Signature

1CURLOPT_HTTPHEADER()

curl option for request headers.

CURLOPT_HTTPHEADER is part of this LaiRu reference group. CURLOPT_HTTPHEADER performs network or protocol work. Make timeouts, encodings, and authentication settings visible in calling code so failures are easier to diagnose.

Examples

Basic call

1curl->set(CURLOPT_HTTPHEADER, array('Accept: application/json'))
Use this value as an option to the call that accepts the corresponding constant group.