【发布时间】:2015-05-02 03:15:31
【问题描述】:
我正在尝试将 OneNote API 集成为新应用程序的一部分。是否可以使用 Google Chrome 的 POSTMAN REST Client 来测试 API? OneNote API 似乎是标准 REST,所以应该没有理由不这样做。
要登录,我按照文档并在 POSTMAN 中发出 GET 请求
https://login.live.com/oauth20_authorize.srf?client_id=myClientIdIsHere&scope=wl.signin&response_type=token&redirect_uri=dontKnowWhatToPutHere
分解,即:
https://login.live.com/oauth20_authorize.srf
client_id=myClientIdIsHere
scope=wl.signin
response_type=token
redirect_uri=dontKnowWhatToPutHere
我根据此博客的建议尝试了以下建议:http://blogs.msdn.com/b/onenotedev/archive/2014/07/23/how-to-authenticate-with-microsoft-account-in-a-chrome-extension.aspx
https://login.live.com/oauth20_authorize.srf?client_id=myClientIdIsHere&scope=wl.signin&response_type=token&redirect_uri=https://login.live.com/oauth20_desktop.srf
当我对此发出 GET 请求时,我会返回 HTML,但它不会显示在预览模式中。
我走对了吗?
【问题讨论】:
-
看起来 POSTMAN 对返回的 html 页面进行了沙箱处理。这会阻止 javascript 运行。这能解释为什么在预览模式下什么都没有出现吗?