Created setHeaders method in Restler and moved all header related code from sendData