Unable to post data to server using XMLHttpRequest
Hi Team,
Actually I am trying to hit the server to post data(XML) from PEGA using XMLHttpRequest but I am getting the Http Status as "0" .Below event listener(onreadystatechange ) is not executing and send is failing with the message: callUrl.launchScreen(): Unexpected error: Failed to execute 'send' on 'XMLHttpRequest': Failed to load "URL".
Code:
Hi Team,
Actually I am trying to hit the server to post data(XML) from PEGA using XMLHttpRequest but I am getting the Http Status as "0" .Below event listener(onreadystatechange ) is not executing and send is failing with the message: callUrl.launchScreen(): Unexpected error: Failed to execute 'send' on 'XMLHttpRequest': Failed to load "URL".
Code:
In above code if I make it as true(synchronous) it is executing the event listener(onreadystatechange ) but for false(asynchronous) it is not executing the event listener(onreadystatechange ) and getting exception:
callUrl.launchScreen(): Unexpected error: Failed to execute 'send' on 'XMLHttpRequest': Failed to load "URL".