Outlook Add-in - Javascript based using React JS - VS Code + WebPack - Unable to call external Web Service

Aug 23, 2022
Reaction score

I am developing a new Outlook Add-in using the new web-based Office Add-In Development Toolkit, with React Fluent UI. Here is the link telling all about it:

For development, I am using VS Code and Yo-Office Node package. Along with it comes the Webpack Development Server which acts as the local development Web-Server for the Outlook Add-in. Basically, the new Add-in is web-based aapplication which eventually gets hosted on a Cloud/Web environment at the time of production deployment. But, for development, it requires a local development Web Server which it would be hosted at and run on.

And with this webpack development Web Server, I am having hard time calling web services which are hosted outside the development environment and are very much avaialable publically. And I am unable to call these web services using the AXIOS JavaScript library from this Outlook Add-in.

The webPack Server runs on HTTPS on localhost. And there are two types of errors that I am getting:

1. Mixed Error - This request has been blocked; the content must be served over HTTPS.
This error is faced when I try to call an externally hoster web service which has a non-HTTPS URL, basically a simple HTTP address.

2. CORS Error - No 'Access-Control-Allow-Origin' header is present on the requested resource.
This error is faced when the web service is there on HTTPS - no matter either it returns a JSON or SOAP response.

Any help on this would be much appreciated.

Thanks, all!
- Arun

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question