Handle both callbacks and promises
Use promises in #generateHAR