2011-03-30 13:49:47 +00:00
|
|
|
.TH HGET 1
|
|
|
|
.SH NAME
|
|
|
|
hget \- retrieve a web page corresponding to a url
|
|
|
|
.SH SYNOPSIS
|
|
|
|
.B hget
|
|
|
|
[
|
|
|
|
.B -o
|
2012-01-11 15:17:54 +00:00
|
|
|
.I file
|
2011-03-30 13:49:47 +00:00
|
|
|
] [
|
|
|
|
.B -p
|
|
|
|
.I body
|
|
|
|
] [
|
|
|
|
.B -r
|
|
|
|
.I header
|
2012-01-11 15:17:54 +00:00
|
|
|
] [
|
|
|
|
.B -m
|
|
|
|
.I method
|
|
|
|
] [
|
|
|
|
.B -b
|
|
|
|
.I baseurl
|
2011-03-30 13:49:47 +00:00
|
|
|
]
|
|
|
|
.I url
|
|
|
|
.SH DESCRIPTION
|
|
|
|
.I Hget
|
|
|
|
retrieves the web page specified by the URL
|
|
|
|
.I url
|
|
|
|
and writes it, absent the
|
|
|
|
.B -o
|
|
|
|
option, to standard output.
|
2012-01-11 15:17:54 +00:00
|
|
|
.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.
|
2011-03-30 13:49:47 +00:00
|
|
|
.PP
|
|
|
|
If
|
|
|
|
.I url
|
|
|
|
is of type HTTP and the
|
|
|
|
.B -p
|
|
|
|
option is specified, then an HTTP POST is performed
|
|
|
|
with
|
|
|
|
.I body
|
|
|
|
as the data to be posted.
|
|
|
|
.PP
|
|
|
|
The
|
|
|
|
.B -o
|
|
|
|
option is used to keep a local file in sync with a
|
|
|
|
web page. If the web page has been modified later than the
|
|
|
|
file, it is copied into the file. If the file is up to date
|
|
|
|
but incomplete,
|
|
|
|
.I hget
|
|
|
|
will fetch the missing bytes.
|
|
|
|
.PP
|
|
|
|
Option
|
|
|
|
.B -r
|
|
|
|
sends an arbitrary HTTP
|
|
|
|
.IR header .
|
|
|
|
.PP
|
|
|
|
Option
|
2012-01-11 15:17:54 +00:00
|
|
|
.B -m
|
|
|
|
overrides the HTTP method used for the request.
|
2011-03-30 13:49:47 +00:00
|
|
|
.SH SOURCE
|
2012-01-11 15:17:54 +00:00
|
|
|
.B /rc/bin/hget
|
2011-03-30 13:49:47 +00:00
|
|
|
.SH "SEE ALSO"
|
2012-01-11 15:17:54 +00:00
|
|
|
.IR webfs (4),
|
2011-03-30 13:49:47 +00:00
|
|
|
.IR ftpfs (4)
|
2012-01-11 15:17:54 +00:00
|
|
|
.SH DIAGNOSTICS
|
|
|
|
.I Hget
|
|
|
|
requires
|
|
|
|
.IR webfs (4)
|
|
|
|
service mounted on
|
|
|
|
.B /mnt/web
|
|
|
|
to work.
|