added ability to pass a function to onResourceRequested to have access to request.abort()