In the Node world (and I think in browser too), the callback is always at the last place, and begins with an error argument (which is set to null if there was no error). So the signature should be (url, method, options, callback), and then you have two options when you call the function with no options:  
**1** Use `callUrl(url, method, undefined, callback)` or `callUrl(url, method,null, callback)`  
**2** Use javascript's way of defining functions, with no specific number of arguments. Begin the function like this:
```
funtion callUrl(url, method, options, callback) {
  if (typeof options === 'function') {
    callback = options;
    options = {};
  }

  // Rest of the code
}
```
Then you can call `callUrl(url, method, undefined, callback)` or `callUrl(url, method, callback)` , it will be the same.