谷歌端点使用浏览器与本地HTTP API
问题描述:
我想查看我的API在本地生成谷歌端点。谷歌端点使用浏览器与本地HTTP API
如果我运行由Android Studio生成的“Hello world”后端示例,并且我连接到localhost:8080
,然后单击第三个链接,浏览器将打开我可以测试API的页面。
在那里,我有关于HTTPS连接的错误:
The API you are exploring is hosted over HTTP, which can cause problems. Learn how to use Explorer with a local HTTP API.
如果我点击“学习如何......”我重定向到这个页面: https://developers.google.com/explorer-help/#hitting_local_api
如果拟议提出的解决方案是正确的,我的问题是如何在Windows 10上使用这些特殊标志打开Chrome?
我也尝试点击导航栏中的护盾,但没有结果。
答
我找到了正确的说明!
进入,例如:
C:\Program Files (x86)\Google\Chrome\Application
和执行:
chrome.exe --user-data-dir=test --unsafely-treat-insecure-origin-as-secure=http://localhost:8080
它将开始在其中您可以测试你的API在Chrome会话。
答
我发现,当与错误页面加载时,它可以很容易地通过右击铬搜索栏的最右侧的shieldshape修正,然后单击脚本的装载