I need to call a webservice with Safari on Mac. Since the methods are in POST I can't paste the url in the address bar of Safari (like with GET methods).
我需要在Mac上使用Safari调用Web服务。由于这些方法都在POST中,我无法将URL粘贴到Safari的地址栏中(就像使用GET方法一样)。
So, I'm looking for a plug-in or similar that allows me to send the request and then receive the response inside the browser. The response is JSON so with the JSON plug in I can see all the response with his formatting.
所以,我正在寻找一个插件或类似的插件,允许我发送请求,然后在浏览器中收到响应。响应是JSON所以使用JSON插件我可以看到他的格式化的所有响应。
Solutions ? Thanks !
方案?谢谢 !
3 个解决方案
#1
31
Safari is my browser of choice, so I can empathize with you for wanting a native plugin. Fortunately, while there aren't any extensions available, there are quite a few native OSX clients for HTTP/REST end-point testing. I have been using CocoaRestClient, which includes auto-formatting and syntax highlighting for JSON, as you requested. It's open source, lightweight, and is at least actively supported by its developers:
Safari是我的首选浏览器,所以我可以同情你想要一个原生插件。幸运的是,虽然没有可用的扩展,但是有很多本地OSX客户端用于HTTP / REST端点测试。我一直在使用CocoaRestClient,它包括JSON的自动格式化和语法突出显示,如您所要求的那样。它是开源的,轻量级的,并且至少得到开发人员的积极支持:
http://mmattozzi.github.io/cocoa-rest-client
http://mmattozzi.github.io/cocoa-rest-client
#2
3
Another great tool is Postman, an application inside Google Chrome.
另一个很棒的工具是Postman,一个位于Google Chrome中的应用程序。
#3
2
I don't know why you care whether the client is in Safari or not. A restful POST should be able to be executed from any sort of client. You might want to look at RESTClient extension for Firefox http://restclient.net/
我不知道你为什么关心客户端是否在Safari中。应该可以从任何类型的客户端执行一个宁静的POST。您可能希望查看Firefox的RESTClient扩展http://restclient.net/
Also just Google 'REST client' you should see plenty of other tools available to generate POST's against your service. If you are really would about Safari-specific responses, most good REST tools, should allow you to set the User-Agent header so as to make the request look like it is coming from Safari.
同样只是Google的“REST客户端”,您应该会看到许多其他工具可用于针对您的服务生成POST。如果您真的想要特定于Safari的响应,那么大多数优秀的REST工具都应该允许您设置User-Agent标头,以使请求看起来像来自Safari。
#1
31
Safari is my browser of choice, so I can empathize with you for wanting a native plugin. Fortunately, while there aren't any extensions available, there are quite a few native OSX clients for HTTP/REST end-point testing. I have been using CocoaRestClient, which includes auto-formatting and syntax highlighting for JSON, as you requested. It's open source, lightweight, and is at least actively supported by its developers:
Safari是我的首选浏览器,所以我可以同情你想要一个原生插件。幸运的是,虽然没有可用的扩展,但是有很多本地OSX客户端用于HTTP / REST端点测试。我一直在使用CocoaRestClient,它包括JSON的自动格式化和语法突出显示,如您所要求的那样。它是开源的,轻量级的,并且至少得到开发人员的积极支持:
http://mmattozzi.github.io/cocoa-rest-client
http://mmattozzi.github.io/cocoa-rest-client
#2
3
Another great tool is Postman, an application inside Google Chrome.
另一个很棒的工具是Postman,一个位于Google Chrome中的应用程序。
#3
2
I don't know why you care whether the client is in Safari or not. A restful POST should be able to be executed from any sort of client. You might want to look at RESTClient extension for Firefox http://restclient.net/
我不知道你为什么关心客户端是否在Safari中。应该可以从任何类型的客户端执行一个宁静的POST。您可能希望查看Firefox的RESTClient扩展http://restclient.net/
Also just Google 'REST client' you should see plenty of other tools available to generate POST's against your service. If you are really would about Safari-specific responses, most good REST tools, should allow you to set the User-Agent header so as to make the request look like it is coming from Safari.
同样只是Google的“REST客户端”,您应该会看到许多其他工具可用于针对您的服务生成POST。如果您真的想要特定于Safari的响应,那么大多数优秀的REST工具都应该允许您设置User-Agent标头,以使请求看起来像来自Safari。