Add built local::lib
[catagits/Gitalist.git] / local-lib5 / man / man1 / lwp-request.1p
CommitLineData
3fea05b9 1.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.3
2.\"
3.\" Standard preamble:
4.\" ========================================================================
5.de Sh \" Subsection heading
6.br
7.if t .Sp
8.ne 5
9.PP
10\fB\\$1\fR
11.PP
12..
13.de Sp \" Vertical space (when we can't use .PP)
14.if t .sp .5v
15.if n .sp
16..
17.de Vb \" Begin verbatim text
18.ft CW
19.nf
20.ne \\$1
21..
22.de Ve \" End verbatim text
23.ft R
24.fi
25..
26.\" Set up some character translations and predefined strings. \*(-- will
27.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
28.\" double quote, and \*(R" will give a right double quote. | will give a
29.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to
30.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C'
31.\" expand to `' in nroff, nothing in troff, for use with C<>.
32.tr \(*W-|\(bv\*(Tr
33.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
34.ie n \{\
35. ds -- \(*W-
36. ds PI pi
37. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
38. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
39. ds L" ""
40. ds R" ""
41. ds C` ""
42. ds C' ""
43'br\}
44.el\{\
45. ds -- \|\(em\|
46. ds PI \(*p
47. ds L" ``
48. ds R" ''
49'br\}
50.\"
51.\" If the F register is turned on, we'll generate index entries on stderr for
52.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
53.\" entries marked with X<> in POD. Of course, you'll have to process the
54.\" output yourself in some meaningful fashion.
55.if \nF \{\
56. de IX
57. tm Index:\\$1\t\\n%\t"\\$2"
58..
59. nr % 0
60. rr F
61.\}
62.\"
63.\" For nroff, turn off justification. Always turn off hyphenation; it makes
64.\" way too many mistakes in technical documents.
65.hy 0
66.if n .na
67.\"
68.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
69.\" Fear. Run. Save yourself. No user-serviceable parts.
70. \" fudge factors for nroff and troff
71.if n \{\
72. ds #H 0
73. ds #V .8m
74. ds #F .3m
75. ds #[ \f1
76. ds #] \fP
77.\}
78.if t \{\
79. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
80. ds #V .6m
81. ds #F 0
82. ds #[ \&
83. ds #] \&
84.\}
85. \" simple accents for nroff and troff
86.if n \{\
87. ds ' \&
88. ds ` \&
89. ds ^ \&
90. ds , \&
91. ds ~ ~
92. ds /
93.\}
94.if t \{\
95. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
96. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
97. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
98. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
99. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
100. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
101.\}
102. \" troff and (daisy-wheel) nroff accents
103.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
104.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
105.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
106.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
107.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
108.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
109.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
110.ds ae a\h'-(\w'a'u*4/10)'e
111.ds Ae A\h'-(\w'A'u*4/10)'E
112. \" corrections for vroff
113.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
114.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
115. \" for low resolution devices (crt and lpr)
116.if \n(.H>23 .if \n(.V>19 \
117\{\
118. ds : e
119. ds 8 ss
120. ds o a
121. ds d- d\h'-1'\(ga
122. ds D- D\h'-1'\(hy
123. ds th \o'bp'
124. ds Th \o'LP'
125. ds ae ae
126. ds Ae AE
127.\}
128.rm #[ #] #H #V #F C
129.\" ========================================================================
130.\"
131.IX Title "LWP-REQUEST 1"
132.TH LWP-REQUEST 1 "2009-11-21" "perl v5.8.7" "User Contributed Perl Documentation"
133.SH "NAME"
134lwp\-request, GET, POST, HEAD \- Simple command line user agent
135.SH "SYNOPSIS"
136.IX Header "SYNOPSIS"
137\&\fBlwp-request\fR [\fB\-afPuUsSedvhx\fR] [\fB\-m\fR \fImethod\fR] [\fB\-b\fR \fIbase \s-1URL\s0\fR] [\fB\-t\fR \fItimeout\fR]
138 [\fB\-i\fR \fIif-modified-since\fR] [\fB\-c\fR \fIcontent-type\fR]
139 [\fB\-C\fR \fIcredentials\fR] [\fB\-p\fR \fIproxy-url\fR] [\fB\-o\fR \fIformat\fR] \fIurl\fR...
140.SH "DESCRIPTION"
141.IX Header "DESCRIPTION"
142This program can be used to send requests to \s-1WWW\s0 servers and your
143local file system. The request content for \s-1POST\s0 and \s-1PUT\s0
144methods is read from stdin. The content of the response is printed on
145stdout. Error messages are printed on stderr. The program returns a
146status value indicating the number of URLs that failed.
147.PP
148The options are:
149.IP "\-m <method>" 4
150.IX Item "-m <method>"
151Set which method to use for the request. If this option is not used,
152then the method is derived from the name of the program.
153.IP "\-f" 4
154.IX Item "-f"
155Force request through, even if the program believes that the method is
156illegal. The server might reject the request eventually.
157.IP "\-b <uri>" 4
158.IX Item "-b <uri>"
159This \s-1URI\s0 will be used as the base \s-1URI\s0 for resolving all relative URIs
160given as argument.
161.IP "\-t <timeout>" 4
162.IX Item "-t <timeout>"
163Set the timeout value for the requests. The timeout is the amount of
164time that the program will wait for a response from the remote server
165before it fails. The default unit for the timeout value is seconds.
166You might append \*(L"m\*(R" or \*(L"h\*(R" to the timeout value to make it minutes or
167hours, respectively. The default timeout is '3m', i.e. 3 minutes.
168.IP "\-i <time>" 4
169.IX Item "-i <time>"
170Set the If-Modified-Since header in the request. If \fItime\fR is the
171name of a file, use the modification timestamp for this file. If
172\&\fItime\fR is not a file, it is parsed as a literal date. Take a look at
173HTTP::Date for recognized formats.
174.IP "\-c <content\-type>" 4
175.IX Item "-c <content-type>"
176Set the Content-Type for the request. This option is only allowed for
177requests that take a content, i.e. \s-1POST\s0 and \s-1PUT\s0. You can
178force methods to take content by using the \f(CW\*(C`\-f\*(C'\fR option together with
179\&\f(CW\*(C`\-c\*(C'\fR. The default Content-Type for \s-1POST\s0 is
180\&\f(CW\*(C`application/x\-www\-form\-urlencoded\*(C'\fR. The default Content-type for
181the others is \f(CW\*(C`text/plain\*(C'\fR.
182.IP "\-p <proxy\-url>" 4
183.IX Item "-p <proxy-url>"
184Set the proxy to be used for the requests. The program also loads
185proxy settings from the environment. You can disable this with the
186\&\f(CW\*(C`\-P\*(C'\fR option.
187.IP "\-P" 4
188.IX Item "-P"
189Don't load proxy settings from environment.
190.IP "\-H <header>" 4
191.IX Item "-H <header>"
192Send this \s-1HTTP\s0 header with each request. You can specify several, e.g.:
193.Sp
194.Vb 4
195\& lwp\-request \e
196\& \-H 'Referer: http://other.url/' \e
197\& \-H 'Host: somehost' \e
198\& http://this.url/
199.Ve
200.IP "\-C <username>:<password>" 4
201.IX Item "-C <username>:<password>"
202Provide credentials for documents that are protected by Basic
203Authentication. If the document is protected and you did not specify
204the username and password with this option, then you will be prompted
205to provide these values.
206.PP
207The following options controls what is displayed by the program:
208.IP "\-u" 4
209.IX Item "-u"
210Print request method and absolute \s-1URL\s0 as requests are made.
211.IP "\-U" 4
212.IX Item "-U"
213Print request headers in addition to request method and absolute \s-1URL\s0.
214.IP "\-s" 4
215.IX Item "-s"
216Print response status code. This option is always on for \s-1HEAD\s0 requests.
217.IP "\-S" 4
218.IX Item "-S"
219Print response status chain. This shows redirect and authorization
220requests that are handled by the library.
221.IP "\-e" 4
222.IX Item "-e"
223Print response headers. This option is always on for \s-1HEAD\s0 requests.
224.IP "\-d" 4
225.IX Item "-d"
226Do \fBnot\fR print the content of the response.
227.IP "\-o <format>" 4
228.IX Item "-o <format>"
229Process \s-1HTML\s0 content in various ways before printing it. If the
230content type of the response is not \s-1HTML\s0, then this option has no
231effect. The legal format values are; \fItext\fR, \fIps\fR, \fIlinks\fR,
232\&\fIhtml\fR and \fIdump\fR.
233.Sp
234If you specify the \fItext\fR format then the \s-1HTML\s0 will be formatted as
235plain latin1 text. If you specify the \fIps\fR format then it will be
236formatted as Postscript.
237.Sp
238The \fIlinks\fR format will output all links found in the \s-1HTML\s0 document.
239Relative links will be expanded to absolute ones.
240.Sp
241The \fIhtml\fR format will reformat the \s-1HTML\s0 code and the \fIdump\fR format
242will just dump the \s-1HTML\s0 syntax tree.
243.Sp
244Note that the \f(CW\*(C`HTML\-Tree\*(C'\fR distribution needs to be installed for this
245option to work. In addition the \f(CW\*(C`HTML\-Format\*(C'\fR distribution needs to
246be installed for \fI\-o text\fR or \fI\-o ps\fR to work.
247.IP "\-v" 4
248.IX Item "-v"
249Print the version number of the program and quit.
250.IP "\-h" 4
251.IX Item "-h"
252Print usage message and quit.
253.IP "\-a" 4
254.IX Item "-a"
255Set text(ascii) mode for content input and output. If this option is not
256used, content input and output is done in binary mode.
257.PP
258Because this program is implemented using the \s-1LWP\s0 library, it will
259only support the protocols that \s-1LWP\s0 supports.
260.SH "SEE ALSO"
261.IX Header "SEE ALSO"
262lwp-mirror, \s-1LWP\s0
263.SH "COPYRIGHT"
264.IX Header "COPYRIGHT"
265Copyright 1995\-1999 Gisle Aas.
266.PP
267This library is free software; you can redistribute it and/or
268modify it under the same terms as Perl itself.
269.SH "AUTHOR"
270.IX Header "AUTHOR"
271Gisle Aas <gisle@aas.no>