.SH SYNOPSIS
.B hget
[
-.B -dhv
-] [
.B -o
-.I ofile
+.I file
] [
.B -p
.I body
-] [
-.B -x
-.I netmntpt
+|
+.B -P
] [
.B -r
.I header
+] [
+.B -m
+.I method
+] [
+.B -b
+.I baseurl
]
.I url
.SH DESCRIPTION
and writes it, absent the
.B -o
option, to standard output.
-The known URL types are: http and ftp.
+.PP
+The
+.I url
+can be a relative path like
+.B ../index.html
+if a absolute
+.I baseurl
+was specified with the
+.B -b
+option.
.PP
If
.I url
is of type HTTP and the
.B -p
-option is specified, then an HTTP POST is performed
-with
+or
+.B -P
+options are specified, then a HTTP POST is performed.
+With
+.B -p
+the data to be posted is provided by the
.I body
-as the data to be posted.
+argument as a string or alternatively with
+.B -P
+read from standard input.
.PP
The
.B -o
will fetch the missing bytes.
.PP
Option
-.B -h
-causes HTTP headers to be printed to standard output
-in addition to the transferred web page.
-.PP
-Option
.B -r
sends an arbitrary HTTP
.IR header .
.PP
Option
-.B -d
-turns on debugging written to standard error.
-.PP
-Normally,
-.I hget
-uses the IP stack mounted under
-.BR /net .
-The
-.B -x
-option can be used to specify the mount point of
-a different IP stack to use.
-.PP
-Option
-.B -v
-writes progress lines to standard error once a second.
-Each line contains two numbers, the bytes transferred so
-far and the total length to be transferred.
-.PP
-If the environment variable
-.B httpproxy
-is set, it is used as a URL denoting an HTTP proxy server.
-All HTTP accesses use this server to get the page instead of
-calling the destination server.
+.B -m
+overrides the HTTP method used for the request.
.SH SOURCE
-.B /sys/src/cmd/hget.c
+.B /rc/bin/hget
.SH "SEE ALSO"
+.IR webfs (4),
.IR ftpfs (4)
+.SH DIAGNOSTICS
+.I Hget
+requires
+.IR webfs (4)
+service mounted on
+.B /mnt/web
+to work.