问题
I want to test some URLs on a web application I\'m working on. For that I would like to manually create HTTP POST requests (meaning I can add whatever parameters I like).
Is there any extension or functionality in Chrome and/or Firefox that I\'m missing?
回答1:
I have been making a Chrome app called Postman for this type of stuff. All the other extensions seemed a bit dated so made my own. It also has a bunch of other features which have been helpful for documenting our own API here.
Postman now also has native apps (i.e. standalone) for Windows, Mac and Linux! It is more preferable now to use native apps, read more here.
回答2:
CURL is AWESOME to do what you want ! It's a simple but effective command line tool.
Rest implementation test commands :
curl -i -X GET http://rest-api.io/items curl -i -X GET http://rest-api.io/items/5069b47aa892630aae059584 curl -i -X DELETE http://rest-api.io/items/5069b47aa892630aae059584 curl -i -X POST -H 'Content-Type: application/json' -d '{"name": "New item", "year": "2009"}' http://rest-api.io/items curl -i -X PUT -H 'Content-Type: application/json' -d '{"name": "Updated item", "year": "2010"}' http://rest-api.io/items/5069b47aa892630aae059584
回答3:
Forget browser and try CLI. HTTPie is great tool!
CLI http clients:
- HTTPie
- HTTP Prompt
- Curl
- wget
If you insist on browser extension then:
Chrome:
- Postman - REST Client (best browser client)
- Advanced REST client
- Restlet Client
Firefox:
- REST Easy (has nice design)
- RESTClient
- Poster plugin
回答4:
Firefox
Open Network panel in Developer Tools by pressing Ctrl-Shift-Q or by going Firefox -> Developer Tools -> Network Tab (highlighted). Then Click on small door icon on top-right (in expanded form in the screenshot, you'll find it just left of the highlighted Headers), second row (if you don't see it then reload the page) -> Edit and resend whatever request you want
EDIT: Added image.
回答5:
Having been greatly inspired by Postman for Chrome, I decided to write something similar for Firefox.
REST Easy* is a restartless Firefox add-on that aims to provide as much control as possible over requests. The add-on is still in an experimental state (it hasn't even been reviewed by Mozilla yet) but development is progressing nicely.

The project is open source, so if anyone feels compelled to help with development, that would be awesome: https://github.com/nathan-osman/Rest-Easy
* the add-on available from http://addons.mozilla.org will always be slightly behind the code available on GitHub
回答6:
You specifically asked for "extension or functionality in Chrome and/or Firefox", which the answers you have already received provide, but I do like the simplicity of oezi's answer to the closed question "how to send a post request with a web browser" for simple parameters. oezi says:
with a form, just set method
to "post"
<form action="blah.php" method="post"> <input type="text" name="data" value="mydata" /> <input type="submit" /> </form>
I.e. build yourself a very simple page to test the post actions.
回答7:
It's a bit ugly, but there's the Simple REST Client extension for Chrome.
It works great for me -- do remember that you can still use the debugger with it. The Network pane is particularly useful; it'll give you rendered JSON objects and error pages.
回答8:
For firefox there is also an extension called RESTClient which is quite nice:
https://addons.mozilla.org/en-US/firefox/addon/restclient
回答9:
May not be directly related to browsers but fiddler is another good software.
回答10:
You could also use Watir or Watin to automate browsers. Watir is written for ruby and Watin is for .Net languages. Not sure if it's what you are looking for though.
- http://watin.sourceforge.net/
- http://watir.com/
回答11:
Try Runscope. A free tool sampling their service is provided at https://www.hurl.it/ . You can set the method, authentication, headers, parameters, and body. Response shows status code, headers, and body. The response body can be formatted from JSON with a collapsable heirarchy. Paid accounts can automate test API calls and use return data to build new test calls. COI disclosure: I have no relationship to Runscope.
回答12:
Check out http-tool
for firefox ..
https://addons.mozilla.org/en-US/firefox/addon/http-tool/
Aimed at web developers who need to debug HTTP requests and responses. Can be extremely useful while developing REST based api. Features: * GET * HEAD * POST * PUT * DELETE Add header(s) to request. Add body content to request. View header(s) in response. View body content in response. View status code of response. View status text of response.
来源:https://stackoverflow.com/questions/4797534/how-do-i-manually-fire-http-post-requests-with-firefox-or-chrome