]> git.lizzy.rs Git - plan9front.git/blobdiff - sys/man/1/hget
paint(1) fix bad cross reference
[plan9front.git] / sys / man / 1 / hget
old mode 100755 (executable)
new mode 100644 (file)
index 7cc8c97..daddb1a
@@ -4,19 +4,22 @@ hget \- retrieve a web page corresponding to a url
 .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
@@ -26,16 +29,31 @@ retrieves the web page specified by the URL
 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
@@ -47,40 +65,22 @@ but incomplete,
 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.