debug optional function parameter

the function sendRequest didn't work when option and callback parameters are specified