src/Common/Internal/RestProxy.php
protected function addOptionalHeader(array &$headers, $key, $value)
    {
        Validate::isString($key, 'key');
        Validate::isString($value, 'value');

        if (!is_null($value) && Resources::EMPTY_STRING !== $value) {
            $headers[$key] = $value;
        }
    }
protected function addOptionalHeader(array &$headers, $key, $value)
    {
        Validate::isString($key, 'key');
        Validate::isString($value, 'value');

        if (!is_null($value) && Resources::EMPTY_STRING !== $value) {
            $headers[$key] = $value;
        }
    }
protected function addOptionalHeader ( array & $ headers , $ key , $ value ) { Validate :: isString ( $ key , 'key' ) ; Validate :: isString ( $ value , 'value' ) ; if ( ! is_null ( $ value ) && Resources :: EMPTY_STRING !== $ value ) { $ headers [ $ key ] = $ value ; } }
Adds optional header.

Doesn't add the value if it satisfies empty().

@param array  &$headers The HTTP header parameters
@param string $key      The HTTP header name
@param string $value    The HTTP header value
Adds optional header .