0

I am using apiary preview --server to watch a file while editing it and have a UI generated.

I would like to hit a local dev server in the "Try" section of the UI, but when I hit "Call Resource", a request is made to POST https://jsapi.apiary.io/apis/null/http-transactions/.

HOST is set to http://localhost:3050 and I'm expecting it to hit that endpoint.

How can I change this?

$ apiary version 0.5.2

enter image description here

4

1 回答 1

1

目前,所有控制台调用都通过apiary.io服务器路由以解决 CORS 限制。

如果已发布,您可以通过使用诸如ngrok 之类的服务公开您的本地端口来解决此限制。

有一个控制台版本的测试,可以直接调用 API,并在需要时使用浏览器插件来绕过 CORS 限制。您应该能够很快使用它们。

于 2016-09-08T19:12:17.490 回答