http_post(1)

http_post(1) General Commands Manual http_post(1)

NAME

http_post - do a POST to an HTTP URL

SYNOPSIS

http_post [-t timeout] [-r referrer] [-u user-agent] [-a username:password] [-c cookie] [-h header value ] [-v] url [-f] name=value ... [-C content-type]

DESCRIPTION

http_post Http_post does a POST operation to an HTTP URL and dumps the results to stdout. It does not do gopher, ftp, file, news, or any other type of URL, only HTTP. It can be configured to do HTTPS POSTs as well.

The -t flag specifies a timeout in seconds. If that much time passes with no activity, the post is aborted. The default is 60 seconds.

The -r flag specifies a referrer header to send. Some tightly-clenched web admins like to jigger their server to only return files if the proper referrer is given.

The -u flag specifies a User-Agent header to send. Some *really* tightly-clenched web admins like to jigger their server to only return files if a well-known User-Agent is given.

The -a flag lets you do Basic Authentication.

The -c flag lets you pass in a cookie.

The -h flag lets you pass in one extra header.

The -v flag is for debugging; it writes out the response headers, as well as the response contents.

The -f flag can be used before each name=value pair. It tells http_post that the value is actually a filename to be read and inserted into the request. It also switches the entire request to use a content-type of multipart/form-data, instead of the usual application/x-www-form-urlencoded.

The -C flag lets you specify a content-type. It also tells http_post to read the content from stdin, instead of generating it from the command-line name-value pairs. Specifying both -C and name-value pairs is an error.

AUTHOR

Copyright © 1999,2003,2018 by Jef Poskanzer <jef@mail.acme.com>. All rights reserved.

16 March 1999