在使用localhost的开发环境中使用onedrive rest api [英] Consuming onedrive rest api in development environment using localhost

查看:79
本文介绍了在使用localhost的开发环境中使用onedrive rest api的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

要使用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 localhostof 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆