HTTP fetch from within Outlook add-ins

泄露秘密 提交于 2019-12-02 07:28:12

You are on the right direction, indeed. To retrieve information from 3rd party web service, you would need:

  • Make request with XMLHttpRequest or $ajax, etc.
  • Add the service URL into manifest's AppDomains list
  • Use only services which are under SSL connection (https://)

Basically you are done, you should be able to get the information from the service. All other issues you may experience related to the service itself, not your calls from inside of the add-in. For example: google redirects you to the https://www.google.es which is not declared under your AppDomains list. The service itself may not be available to provide with any information and you may get 403 response. The service may not allow CORS requests or may allow it under certain authorization via tokens, licenses, etc. The following sources may help you to get more on the topic:

Basically this is up to the service. This is the reason why ppl are usually write their own service, which will allow the add-in request, because they have full control over it. This service in the same time may do certain sub-requests to other services to get required information.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!