Evernote Webhook 测试本地
Evernote Webhook test local
我需要在本地测试 evernote webhook,我不知道该怎么做。有办法模拟 evernote 的响应吗?或指示像 localhost 这样的本地 url 作为回调挂钩?
谢谢!
我可以想到 2 个选项:
前者记录对它发出的任何请求,以便您可以在本地重播它们。
只需创建一个(私有)"bin" 并要求印象笔记将您的 webhook 设置为给定的 url(类似于 http://requestb.in/123hgj78)。每个进入您垃圾桶的请求都会被记录下来。
优点:易于设置
缺点:您必须重建请求才能在本地应用程序上重播它。
后者是一个在外部世界和本地服务器之间创建安全隧道的应用程序。
首先,在 https://ngrok.com/ 和 "install" 上下载应用程序(您只需实际解压缩)。
然后 运行 ngrok http 80
在终端中。这将设置一个隧道并给你一个url(比如http://92832de0.ngrok.io) that will be the endpoint of your webhook(s). All the requests will be redirected to your local server. You'll also be able to inspect the requests through a web app (http://localhost:4040)并根据你的喜好重放它们。
优点:请求确实到达了您的服务器。您不必手动重播它们。
缺点:您必须下载并安装一个应用程序...
我真的很喜欢两者,但我会说 ngrok 是您的更好选择。
希望对您有所帮助。
我需要在本地测试 evernote webhook,我不知道该怎么做。有办法模拟 evernote 的响应吗?或指示像 localhost 这样的本地 url 作为回调挂钩?
谢谢!
我可以想到 2 个选项:
前者记录对它发出的任何请求,以便您可以在本地重播它们。 只需创建一个(私有)"bin" 并要求印象笔记将您的 webhook 设置为给定的 url(类似于 http://requestb.in/123hgj78)。每个进入您垃圾桶的请求都会被记录下来。
优点:易于设置
缺点:您必须重建请求才能在本地应用程序上重播它。
后者是一个在外部世界和本地服务器之间创建安全隧道的应用程序。
首先,在 https://ngrok.com/ 和 "install" 上下载应用程序(您只需实际解压缩)。
然后 运行 ngrok http 80
在终端中。这将设置一个隧道并给你一个url(比如http://92832de0.ngrok.io) that will be the endpoint of your webhook(s). All the requests will be redirected to your local server. You'll also be able to inspect the requests through a web app (http://localhost:4040)并根据你的喜好重放它们。
优点:请求确实到达了您的服务器。您不必手动重播它们。
缺点:您必须下载并安装一个应用程序...
我真的很喜欢两者,但我会说 ngrok 是您的更好选择。
希望对您有所帮助。