48

How can I send a POST request with a web browser?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
matt jack
  • 821
  • 2
  • 8
  • 9
  • See http://stackoverflow.com/questions/4797534/how-do-i-manually-fire-http-post-requests-with-firefox-or-chrome/29419094#29419094 – Bennett Brown Apr 02 '15 at 18:35
  • 1
    This isn't a duplicate because it does not request an extension or a tool but specifically limits to browser only. Which yielded the superb answer by [@oezi](https://stackoverflow.com/a/3307401/8080472) – datv Jul 24 '18 at 12:17
  • 1
    This also isn't a duplicate because this question was asked before the referenced question. – Bash Jun 14 '19 at 20:31

2 Answers2

62

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>
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
oezi
  • 51,017
  • 10
  • 98
  • 115
  • 17
    Or you can use Chrome Poster ( https://chrome.google.com/webstore/detail/chrome-poster/cdjfedloinmbppobahmonnjigpmlajcd ) or Firefox Poster ( https://addons.mozilla.org/ru/firefox/addon/poster/ ) extentions, if the purpose is testing. – bogatyrjov Nov 26 '12 at 18:34
  • 1
    thank you! this was my only resort because I can't download useful extensions like "Postman" at my workplace. – Abeer Sul Apr 17 '17 at 07:09
14

You can create an HTML page with a form, having method="post" and action="yourdesiredurl" and open it with your browser.

As an alternative, there are some browser plugins for developers that allow you to do that, like Web Developer Toolbar for Firefox.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Matteo Mosca
  • 7,380
  • 4
  • 44
  • 80