1wwwget(1)                   General Commands Manual                  wwwget(1)
2
3
4

NAME

6       www (done) equest on HTTP
7                           (Rev. February 2007)
8

SYNTAX

10       wwwget  [-v]  [-s]  [-m...]  [-abs]  [-post|  -head|-get|-redirect] [-c
11       name=value] [-p#
12        prompt] [-q] [-D domain] [-F from ] [-U username]  [-P  password]  [-i
13       input_file]  [-o  output_file] [-r range] [ -to secs] [URL|host[:port]]
14       [query_argument]...
15

DESCRIPTION

17       wwwget gets one or several HTTP document(s) directly  on  the  standard
18       output.  It avoids the usage of Netscape or similar browser.  When only
19       the host is specified as a command-line argument, documents relative to
20       the host are assumed to be specified in the standard input.
21

OPTIONS

23       -v  is a verbose option (display number of bytes transferred)
24
25       -m[version]   emulates  Mozilla  (insert in the message the User-Agent,
26       etc); the default version is 3.
27
28       -s  silent mode: the HTTP header is stripped. By  default  this  header
29       (containing  the  status,  Content-Type, etc), which is terminated by a
30       blank line, is displayed on the standard error.
31
32       -post  get the document in a POST method. The default is GET method.
33
34       -head  get the document in a HEAD method (only the header). The default
35       is GET method.
36
37       -get  use the default GET method to retrieve the document.
38
39       -redirect   generates  a  Redirect block instead of querying the remote
40       site. Essentially useful when associated with the -q option.
41
42       -abs  translates relative anchors to absolute ones, providing therefore
43       useable HTML files. This operation is similar to the wwwabs(1) program.
44
45       -c cookie  to forward a cookie (in the form name =value)
46
47       -p[n]  prompt   to  define  the prompt text - a text which indicates to
48       stop the data. A number n  may be attached to the -p argument to  indi‐
49       cate to stop at nth occurence of the prompt.
50
51       -q   to indicate a query, i.e. the URL indicates only a cgi script, and
52       arguments to this script  are  given  as  query_argument  supplementary
53       arguments.  When no supplementary query_argument appears on the command
54       line, the arguments are assumed to be in the input_file or the standard
55       input,  one line per argument; in this input, lines starting by a blank
56       (or a tab) are considered as a continuation of the  previous  line.  An
57       example is given below.
58
59       -F  from   specifies  the  From: string in the HTTP protocol, typically
60       used to propagate e-mails. This directorive is used  to  propagate  the
61       origin of Aladin calls to VizieR.
62
63       -D  domain   specifies  the  domain  name which is required in the WWW-
64       Authenticate context; the domain name is specified in the WWW-Authenti‐
65       cate: answer from the HTTP server.
66
67       -U  username   specifies the username for documents requiring an Autho‐
68       rization.
69
70       -P password  specifies the password for documents requiring  an  Autho‐
71       rization.
72
73       -i  input_file   specifies  the  input file, useful in the -query mode.
74       Default input file is stdin.
75
76       -o output_file  specifies the  output  file,  containing  the  results.
77       Default output file is stdout.
78
79       -r range_of_bytes  specifies a starting/ending point of the document to
80       get.
81
82       -to secs  specifies a time-out in seconds between the  reception  of  2
83       packets; the default is 1200 (20min).
84
85       URL|host[:port]
86
87       =>  When  a  full  URL  is  specified, the document is located and dis‐
88           played.
89
90       =>  if only a hostname is supplied, document names are  assumed  to  be
91           specified  in  the standard input; documents specified in the stan‐
92           dard input without hostname are then  assumed  to  be  relative  to
93           host.
94
95       =>  when  no  document  or  host  is  specified,  the standard input is
96           assumed to contain fully qualified URLs.
97

RETURNED STATUS

99       wwwget returns 0 in case of success.
100
101       The code 1 is returned when there are invalid arguments,  or  when  the
102       host could not be contacted.
103
104       The  code  2  is  returned when the contacted server indicates an error
105       (HTTP error code above 400).
106

HTTP STATUSES

108       (from http://www.faqs.org/rfcs/rfc2616.html)
109
110       1.  Informational 1xx
111
112              =>  100 Continue
113
114              =>  101 Switching Protocols
115
116       2.  Successful 2xx
117
118              =>  200 OK
119
120              =>  201 Created
121
122              =>  202 Accepted
123
124              =>  203 Non-Authoritative Information
125
126              =>  204 No Content
127
128              =>  205 Reset Content
129
130              =>  206 Partial Content
131
132       3.  Redirection 3xx
133
134              =>  300 Multiple Choices
135
136              =>  301 Moved Permanently
137
138              =>  302 Found
139
140              =>  303 See Other
141
142              =>  304 Not Modified
143
144              =>  305 Use Proxy
145
146              =>  306 (Unused)
147
148              =>  307 Temporary Redirect
149
150       4.  Client Error 4xx
151
152              =>  400 Bad Request
153
154              =>  401 Unauthorized
155
156              =>  402 Payment Required
157
158              =>  403 Forbidden
159
160              =>  404 Not Found
161
162              =>  405 Method Not Allowed
163
164              =>  406 Not Acceptable
165
166              =>  407 Proxy Authentication Required
167
168              =>  408 Request Timeout
169
170              =>  409 Conflict
171
172              =>  410 Gone
173
174              =>  411 Length Required
175
176              =>  412 Precondition Failed
177
178              =>  413 Request Entity Too Large
179
180              =>  414 Request-URI Too Long
181
182              =>  415 Unsupported Media Type
183
184              =>  416 Requested Range Not Satisfiable
185
186              =>  417 Expectation Failed
187
188       5.  Server Error 5xx
189
190              =>  500 Internal Server Error
191
192              =>  501 Not Implemented
193
194              =>  502 Bad Gateway
195
196              =>  503 Service Unavailable
197
198              =>  504 Gateway Timeout
199
200              =>  505 HTTP Version Not Supported
201

EXAMPLES

203       1.  Get the result of a query into a reuseable file:
204           wwwget -strip -abs http://vizier/cgi-bin?-source=HIP > HIP.html
205
206
207       2.  Query vizier with arguments specified in the standard input:
208           wwwget  -strip   -q  http://vizier.u-strasbg.fr/cgi-bin/asu-xml  <<
209           ====ENDofQuery
210           -source=I/239/hip_main
211           HIP=1..10
212           -out.all
213           ====ENDofQuery
214
215
216       which could also be called as:
217       wwwget           -q          http://vizier.u-strasbg.fr/cgi-bin/asu-xml
218       -source=I/239/hip_main HIP=1..10 -out.all
219
220
221       or as
222       wwwget            -q            http://vizier.u-strasbg.fr/cgi-bin/asu-
223       xml\?-source=I/239/hip_main HIP=1..10 -out.all
224
225

SEE ALSO

227       netscape(1) wwwabs(1)
228
229
230
231                                                                     wwwget(1)
Impressum