lib/response.js
function Response(options) {
  options = options || {};

  this.body = options.body || {};
  this.headers = {};
  this.status = 200;

  // Store the headers in lower case.
  for (var field in options.headers) {
    if (options.headers.hasOwnProperty(field)) {
      this.headers[field.toLowerCase()] = options.headers[field];
    }
  }

  // Store additional properties of the response object passed in
  for (var property in options) {
    if (options.hasOwnProperty(property) && !this[property]) {
      this[property] = options[property];
    }
  }
}
function Response(options) {
  options = options || {};

  this.body = options.body || {};
  this.headers = {};
  this.status = 200;

  // Store the headers in lower case.
  for (var field in options.headers) {
    if (options.headers.hasOwnProperty(field)) {
      this.headers[field.toLowerCase()] = options.headers[field];
    }
  }

  // Store additional properties of the response object passed in
  for (var property in options) {
    if (options.hasOwnProperty(property) && !this[property]) {
      this[property] = options[property];
    }
  }
}
function Response ( options ) { options = options || { } ; this . body = options . body || { } ; this . headers = { } ; this . status = 200 ; // Store the headers in lower case. for ( var field in options . headers ) { if ( options . headers . hasOwnProperty ( field ) ) { this . headers [ field . toLowerCase ( ) ] = options . headers [ field ] ; } } // Store additional properties of the response object passed in for ( var property in options ) { if ( options . hasOwnProperty ( property ) && ! this [ property ] ) { this [ property ] = options [ property ] ; } } }
Constructor.
Constructor .