Corrected send code for restify

Previous code worked only for express servers. 

Corrected code will work for either restify or express servers.