function handleResponse(done) {
  return function onResponse(err, body, response) {
    if (!err) done (null, response);
    else {
      err.response = response;
      err.responseBody = body;
      done(err);
    }
  };
}
/*Codes_SRS_NODE_DEVICE_HTTP_05_010: [When any Http method receives an HTTP response with a status code < 300, it shall invoke the done callback function with the following arguments:
err - null
body - the body of the HTTP response
response - the Node.js http.ServerResponse object returned by the transport]*/
[When any Http method receives an HTTP response with a status code < 300, it shall invoke the done callback function with the following arguments:
err - null
body - the body of the HTTP response
response - the Node.js http.ServerResponse object returned by the transport]
[ When any Http method receives an HTTP response with a status code < 300 it shall invoke the done callback function with the following arguments : err - null body - the body of the HTTP response response - the Node . js http . ServerResponse object returned by the transport ]
function handleResponse(done) {
  return function onResponse(err, body, response) {
    if (!err) done (null, response);
    else {
      err.response = response;
      err.responseBody = body;
      done(err);
    }
  };
}
function handleResponse ( done ) { return function onResponse ( err , body , response ) { if ( ! err ) done ( null , response ) ; else { err . response = response ; err . responseBody = body ; done ( err ) ; } } ; }
Codes_SRS_NODE_DEVICE_HTTP_05_010: [When any Http method receives an HTTP response with a status code < 300, it shall invoke the done callback function with the following arguments:
err - null
body - the body of the HTTP response
response - the Node.js http.ServerResponse object returned by the transport]
Codes_SRS_NODE_DEVICE_HTTP_05_010 : [ When any Http method receives an HTTP response with a status code < 300 it shall invoke the done callback function with the following arguments : err - null body - the body of the HTTP response response - the Node . js http . ServerResponse object returned by the transport ]