lib/collection/request.js
function (header) {
        if (!(header && header.key)) { return; } // if no valid header is provided, do nothing

        var existing = this.headers.find({ key: header.key });

        if (!existing) {
            return this.headers.add(header);
        }

        existing.value = header.value;
    }
function (header) {
        if (!(header && header.key)) { return; } // if no valid header is provided, do nothing

        var existing = this.headers.find({ key: header.key });

        if (!existing) {
            return this.headers.add(header);
        }

        existing.value = header.value;
    }
function ( header ) { if ( ! ( header && header . key ) ) { return ; } // if no valid header is provided, do nothing var existing = this . headers . find ( { key : header . key } ) ; if ( ! existing ) { return this . headers . add ( header ) ; } existing . value = header . value ; }
Updates or inserts the given header.

@param {Object} header
Updates or inserts the given header .