20

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).

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.

Solutions ? Thanks !

Fry
  • 6,235
  • 8
  • 54
  • 93

3 Answers3

34

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:

http://mmattozzi.github.io/cocoa-rest-client

nallenscott
  • 702
  • 7
  • 9
6

Another great tool is Postman, an application inside Google Chrome.

Fry
  • 6,235
  • 8
  • 54
  • 93
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/

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.

Mike Brant
  • 70,514
  • 10
  • 99
  • 103
  • 3
    I want use Safari because is my default browser and I've installed a JSON formatting plug in to read the code very simply – Fry Feb 12 '13 at 19:31
  • 1
    @Fry tools like RESTclient will also provide readable format JSON responses. – Mike Brant Feb 12 '13 at 19:48
  • 1
    A good reason to use Safari is that it intercepts 401 AJAX responses, and testing the behaviour of a client-side application requires the use of Safari: http://stackoverflow.com/questions/9137611/how-to-prevent-safari-from-intercepting-401-responses-to-ajax-requests – Conan Oct 29 '14 at 14:46
  • or someone like me could have this problem :( http://stackoverflow.com/questions/32018621/angularjs-headers-not-added-in-my-rest-using-safari – napstercake Aug 14 '15 at 22:44
  • I tried to use RESTclient from FireFox on CentOS, but POST, PUT and DELETE requests are refused by server while GET and OPTIONS works fine. I am not sure it is the problem with the plugin, but just be aware. – C.A.B. Mar 03 '17 at 03:05