'use strict';

var _ = require('lodash');

function Response(payload) {
  this.content = payload.content;
  this.result = this.content.result;
  this.headers = payload.properties.headers;
  this.properties = _.omit(payload.properties, 'headers');
}

module.exports = Response;

@@ -36,16 +36,150 @@
 ash');%0A%0A
+function compact(obj) %7B%0A  return _.transform(obj, function(result, val, key) %7B%0A    if (val) %7B%0A      result%5Bkey%5D = val;%0A    %7D%0A  %7D);%0A%7D%0A%0A
 function
@@ -199,16 +199,16 @@
 load) %7B%0A
-
   this.c
@@ -335,16 +335,24 @@
 rties = 
+compact(
 _.omit(p
@@ -380,16 +380,17 @@
 eaders')
+)
 ;%0A%7D%0A%0Amod

remove undefined properties in response