Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Dumb question: is there a batch-mode utility (e.g. particular options for curl or wget) that can let me issue raw HTTP commands, and either output the raw results or pipe/redirect it as I see fit?

I know telnet theoretically works but I'm running Windows XP and both Microsoft telnet and PuTTY seem to be interactive and seem to screw things up.

edit: (clarification) I've used curl before, so am familiar w/ the idea, as well as how to send parameters via GET/POST, just not how to control the headers explicitly, and how to keep headers in the output... I can see two possible methods that would be useful to me:

  1. Raw HTTP I/O -- I had meant literally like telnet but in batch mode (not opening up a new window or mucking with the terminal settings):

    GET http://someserver/someresource/blah.html
    HTTP/1.1 301 Moved Permanently
    Date: Wed, 14 Oct 2009 21:23:40 GMT
  2. "easy" input, raw HTTP output -- using curl in the normal methods, but being able to see the raw output verbatim:

    > curl --some-option --another-option http://someserver/someresource/blah.html
    HTTP/1.1 301 Moved Permanently
    Date: Wed, 14 Oct 2009 21:23:40 GMT
share|improve this question

Yes, both curl and wget can do this. Please give us more details on what kind of commands you want to execute.

Random example:

wget --post-data="Some random data sent via POST" "" -q -O results.txt

Sends some data via POST, as well as some arguments via GET to a specific URL. -q means don't give me progress updates, -O specifies what file to output to. Use -O - if you would like to pipe the results instead of saving to a file.

share|improve this answer

Curl or wget are good options. But if you really want to have something equivalent to telnet you should probably use netcat (win32) instead of using telnet. Netcat is designed for raw i/o telnet isn't.

share|improve this answer

HTTP Client for Mac OS X is handy,

share|improve this answer
The OP said nothing about OS X. – Dennis Williamson Oct 14 '09 at 21:47

For "easy" input, raw HTTP output : curl -i --raw

For the other i guess that telnet is your best chance.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.