Generic Open Source REST Client? [closed]

2019-04-04 13:37发布

问题:

I want a simple client that takes a few parameters (Method, URL, Parameters), makes an HTTP request, and shows me the results that were returned.

A browser obviously can easily send GET and POST requests, but I have no good ideas on DELETE and UPDATE.

Did I miss something in browser 101, or is there a common freeware tool to do this? I've seen other threads that give me Java APIs for a simple client, but that's not what I'm looking for.

回答1:

Firefox with the Poster add-on will do what you want.



回答2:

The Java application rest-client http://code.google.com/p/rest-client/ sounds like a good option.



回答3:

When I have done REST development, curl has been excellent for me. It is flexible enough to be able to handle almost any situation that arises, and once you get the hang of which options to include, it is really easy to use.



回答4:

Spring has a rather fine RestTemplate class which acts as a REST-style client. Great if you already use Spring, but probably a bit of a bulky library if you don't.

Note: this seems to be a genuine REST client, not just watered-down RPC-over-HTTP which is what passes for REST in most cases.



回答5:

From a mailing list I'm on: curl works just fine.

Also, Poster for Firefox, and the less-mature Poster for Chrome.



回答6:

On Github there is a command line tool called http-console, which looks nice.

Link: http://github.com/cloudhead/http-console



回答7:

The most generic option would be to simply use Apache HTTP Components. There is nothing special about the request/response formatting like you see in SOAP, so any basic HTTP library will work.



回答8:

+1 for Curl, but if you want a GUI tool, there are many plugins to different browsers, for Chrome try REST Console: https://chrome.google.com/webstore/detail/cokgbflfommojglbmbpenpphppikmonn



回答9:

No one has mentioned RESTClient for Firefox yet. I prefer it to the Poster addon because it supports basic authentication more easily, and saving/opening complete requests. What it doesn't have- and Poster does have - is the ability to upload files. But if you don't need to do that, I prefer it over the other alternatives I know.