Add request logging

This commit is contained in:
Matt Low 2021-03-13 15:05:53 -07:00
parent 83784bec8f
commit 1d4b0cbac3

View File

@ -72,6 +72,10 @@ async function initRingCentralSDK() {
platform.on(platform.events.refreshError, (err) => { platform.on(platform.events.refreshError, (err) => {
console.error("Refresh error", err); console.error("Refresh error", err);
}); });
const client = sdk.client();
client.on(client.events.beforeRequest, (request) => {
console.log(request.url);
});
await sdk.login({ await sdk.login({
username: process.env.RC_LOGIN_USERNAME, username: process.env.RC_LOGIN_USERNAME,
extension: process.env.RC_LOGIN_EXT, extension: process.env.RC_LOGIN_EXT,