]> git.lizzy.rs Git - plan9front.git/blob - sys/man/1/hget
Import sources from 2011-03-30 iso image - sys/man
[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 -dhv
8 ] [
9 .B -o
10 .I ofile
11 ] [
12 .B -p
13 .I body
14 ] [
15 .B -x
16 .I netmntpt
17 ] [
18 .B -r
19 .I header
20 ]
21 .I url
22 .SH DESCRIPTION
23 .I Hget
24 retrieves the web page specified by the URL
25 .I url
26 and writes it, absent the
27 .B -o
28 option, to standard output.
29 The known URL types are: http and ftp.
30 .PP
31 If
32 .I url
33 is of type HTTP and the
34 .B -p
35 option is specified, then an HTTP POST is performed
36 with
37 .I body
38 as the data to be posted.
39 .PP
40 The
41 .B -o
42 option is used to keep a local file in sync with a
43 web page.  If the web page has been modified later than the
44 file, it is copied into the file.  If the file is up to date
45 but incomplete,
46 .I hget
47 will fetch the missing bytes.
48 .PP
49 Option
50 .B -h
51 causes HTTP headers to be printed to standard output
52 in addition to the transferred web page.
53 .PP
54 Option
55 .B -r
56 sends an arbitrary HTTP
57 .IR header .
58 .PP
59 Option
60 .B -d
61 turns on debugging written to standard error.
62 .PP
63 Normally,
64 .I hget
65 uses the IP stack mounted under
66 .BR /net .
67 The
68 .B -x
69 option can be used to specify the mount point of
70 a different IP stack to use.
71 .PP
72 Option
73 .B -v
74 writes progress lines to standard error once a second.
75 Each line contains two numbers, the bytes transferred so
76 far and the total length to be transferred.
77 .PP
78 If the environment variable
79 .B httpproxy
80 is set, it is used as a URL denoting an HTTP proxy server.
81 All HTTP accesses use this server to get the page instead of
82 calling the destination server.
83 .SH SOURCE
84 .B /sys/src/cmd/hget.c
85 .SH "SEE ALSO"
86 .IR ftpfs (4)