3

I am testing a PHP page which gets some data which was POSTed to it. I want to test it and, although I could make a quick PHP page which could send the data I input, I would have thought it would be a feature of the dev tools in Chrome, Safari, etc or a Firebug feature or a browser plugin? I've been searching but I can't find anything.

Should I just make a quick PHP page, or is there a way around this?

Thanks!

samiles
  • 3,768
  • 12
  • 44
  • 71
  • 1
    This may help: http://superuser.com/questions/149329/how-do-i-make-a-post-request-with-the-curl-command-line-tool – Jeremy Harris Feb 15 '12 at 14:51
  • 1
    I always just create a simple html page - no css, no UI magic, just plain simple html - takes exactly 1 minute (ok, maybe 2 minutes for longer forms) – Aleks G Feb 15 '12 at 14:52

5 Answers5

3

Depends on your development setup, personally I use raw curl via console. Browser extensions have been mentioned at How do I manually fire HTTP POST requests with Firefox or Chrome?.

Community
  • 1
  • 1
Mikulas Dite
  • 7,790
  • 9
  • 59
  • 99
3

I use the Simple REST Client Chrome extension for this. Plug in a URL, an HTTP method, some headers, and a body. Press submit and it spits out the response body. If it's a JSON response I use a nice Pretty Printer tool.

bensnider
  • 3,742
  • 1
  • 24
  • 25
1

I've used the modify headers plugin for that purpose. I also use curl for testing as well.

Mike Bockus
  • 2,079
  • 17
  • 23
0

I would use the Insomnia REST Client, like so:

  1. Select "Post":

  1. Type in the URL and optionally any parameters.

  2. Click "Send".

I am not affiliated with the creators of Insomnia.

noɥʇʎԀʎzɐɹƆ
  • 9,967
  • 2
  • 50
  • 67
0

Better use firebug addon in Firefox

http://getfirebug.com/

Akhil Thayyil
  • 9,263
  • 6
  • 34
  • 48