http@ 1 user commands djbwares
http@ gets a web page from a remote host.
`http@` host page port

## Description

`http@` uses tcpclient 1 to connect to TCP port port on host, sends an HTTP 1.0 request for page, and prints any data that it receives. It uses delcr 1 to remove CR (\015). Unprintable characters are output as-is.

The HTTP request is

    GET /page HTTP 1.0
    Host: host

If host is not supplied, `http@` connects to the local host. If page is not supplied, `http@` requests `/`. If port is not supplied, `http@` uses port 80.

TCP port 80 is the well-known port for the HTTP service. Some computers respond to HTTP requests on this port. For example, they may be running `tcpserver -R -H -l0 0 80 httpd /public/file/` using tcpserver 1 and httpd 1.

## History

`http@` was originally part of Daniel J. Bernstein's ucspi-tcp toolset in 1999.

## Author

Original code and documentation by Daniel J. Bernstein. Documentation modernizations by Jonathan de Boyne Pollard.