EdTGuy Posted September 29, 2023 Report Share Posted September 29, 2023 I've defined a zone with type Inline Video ad. The VAST2 Invocation Code is https://{myHost}/www/delivery/fc.php?script=apVideo:vast2&zoneid=1 If I enter this in the url field of Microsoft Edge, it returns an XML document; however, if I use it as the url argument to fetch, it returns an empty object. I created a simple test html file, and still does not return the xml contents that are returned by directly accessing the url via a browser. What is the difference? <html> <head> <meta http-equiv="Content-Security-Policy" content="script-src 'unsafe-inline'"> <script type="text/javascript"> async function fetchVideo() { var url = 'https://{myHost}/www/delivery/fc.php?script=apVideo:vast2&zoneid=1' let response = await fetch(url, { mode: 'no-cors' }) let xmlText = await response.text() return xmlText } console.log(`fetchVideo: ${fetchVideo()}`) </script> </head> <body> Happy Happy Joy Joy </body> </html> Quote Link to comment Share on other sites More sharing options...
isabella Posted September 29, 2023 Report Share Posted September 29, 2023 (edited) Is myhost live or is it in a local environment? Have you checked console? Edited September 29, 2023 by isabella Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.