You are here

function cc::http_headers_add in Constant Contact 6.2

* This method allows us to add a specific header to the http_request_headers array * *

Parameters

string The name of the header to add: * @param string The value of the header to add * * @access private

3 calls to cc::http_headers_add()
cc::http_auth_headers in ./class.cc.php
* This method adds the necessary HTTP auth headers to communicate with the API * * * @access private
cc::http_build_request_headers in ./class.cc.php
* This method calls other methods * It is mainly here so we can do everything in the correct order, according to HTTP spec * *
cc::http_send in ./class.cc.php
* This does most the work of creating the HTTP request * *

File

./class.cc.php, line 1899

Class

cc
@file

Code

function http_headers_add($header, $value) {
  if (trim($header) != '' && !is_numeric($header)) {
    $this->http_request_headers[$header] = $value;
  }
  else {
    $this->http_request_headers[] = $value;
  }
}