在使用localhost的开发环境中使用onedrive rest api [英] Consuming onedrive rest api in development environment using localhost
问题描述
要使用jquery访问存储在一个驱动器中的文件列表. REST API提供了一个重定向到应用程序的参数,即redirect_uri,可以是localhost,也可以是公共域.
Want to access list of files stored in one drive using jquery. REST API provides a parameter to redirect to the application namely redirect_uri, can it be localhost or it should be public domain.
开发人员如何测试onedrive rest api.
How developer have to test onedrive rest api.
推荐答案
您需要将redirect_uri
映射到Web服务器的localhost
.可以通过将其添加到\Windows\System32\drivers\etc\hosts
下的host
文件中来完成.
You need to map your redirect_uri
to localhost
of your web server. This can be done by adding it in host
file found under \Windows\System32\drivers\etc\hosts
.
添加后,它应该看起来像
After adding, it should look like
127.0.0.1 MyDomain.com
127.0.0.1 AnotherDomain.com
有关此信息,请参考MSDN开发中心-测试Web应用程序本地
For more information on this, refer MSDN Dev Center - Testing web apps locally
这篇关于在使用localhost的开发环境中使用onedrive rest api的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!