]> git.lizzy.rs Git - plan9front.git/blob - sys/man/1/hget
paint(1) fix bad cross reference
[plan9front.git] / sys / man / 1 / hget
1 .TH HGET 1
2 .SH NAME
3 hget \- retrieve a web page corresponding to a url
4 .SH SYNOPSIS
5 .B hget
6 [
7 .B -o
8 .I file
9 ] [
10 .B -p
11 .I body
12 |
13 .B -P
14 ] [
15 .B -r
16 .I header
17 ] [
18 .B -m
19 .I method
20 ] [
21 .B -b
22 .I baseurl
23 ]
24 .I url
25 .SH DESCRIPTION
26 .I Hget
27 retrieves the web page specified by the URL
28 .I url
29 and writes it, absent the
30 .B -o
31 option, to standard output.
32 .PP
33 The
34 .I url
35 can be a relative path like
36 .B ../index.html
37 if a absolute
38 .I baseurl
39 was specified with the
40 .B -b
41 option.
42 .PP
43 If
44 .I url
45 is of type HTTP and the
46 .B -p
47 or
48 .B -P
49 options are specified, then a HTTP POST is performed.
50 With
51 .B -p
52 the data to be posted is provided by the
53 .I body
54 argument as a string or alternatively with
55 .B -P
56 read from standard input.
57 .PP
58 The
59 .B -o
60 option is used to keep a local file in sync with a
61 web page.  If the web page has been modified later than the
62 file, it is copied into the file.  If the file is up to date
63 but incomplete,
64 .I hget
65 will fetch the missing bytes.
66 .PP
67 Option
68 .B -r
69 sends an arbitrary HTTP
70 .IR header .
71 .PP
72 Option
73 .B -m
74 overrides the HTTP method used for the request.
75 .SH SOURCE
76 .B /rc/bin/hget
77 .SH "SEE ALSO"
78 .IR webfs (4),
79 .IR ftpfs (4)
80 .SH DIAGNOSTICS
81 .I Hget
82 requires 
83 .IR webfs (4)
84 service mounted on
85 .B /mnt/web
86 to work.