????

Your IP : 18.224.68.177


Current Path : /usr/local/share/man/man1/
Upload File :
Current File : //usr/local/share/man/man1/lwp-request.1

.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.13)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings.  \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
.\" nothing in troff, for use with C<>.
.tr \(*W-
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
.    ds -- \(*W-
.    ds PI pi
.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
.    ds L" ""
.    ds R" ""
.    ds C` ""
.    ds C' ""
'br\}
.el\{\
.    ds -- \|\(em\|
.    ds PI \(*p
.    ds L" ``
.    ds R" ''
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\"
.\" If the F register is turned on, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD.  Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.ie \nF \{\
.    de IX
.    tm Index:\\$1\t\\n%\t"\\$2"
..
.    nr % 0
.    rr F
.\}
.el \{\
.    de IX
..
.\}
.\" ========================================================================
.\"
.IX Title "LWP-REQUEST 1"
.TH LWP-REQUEST 1 "2015-12-05" "perl v5.10.1" "User Contributed Perl Documentation"
.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH "NAME"
lwp\-request, GET, POST, HEAD \- Simple command line user agent
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
\&\fBlwp-request\fR [\fB\-afPuUsSedvhx\fR] [\fB\-m\fR \fImethod\fR] [\fB\-b\fR \fIbase \s-1URL\s0\fR] [\fB\-t\fR \fItimeout\fR]
            [\fB\-i\fR \fIif-modified-since\fR] [\fB\-c\fR \fIcontent-type\fR]
            [\fB\-C\fR \fIcredentials\fR] [\fB\-p\fR \fIproxy-url\fR] [\fB\-o\fR \fIformat\fR] \fIurl\fR...
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
This program can be used to send requests to \s-1WWW\s0 servers and your
local file system. The request content for \s-1POST\s0 and \s-1PUT\s0
methods is read from stdin.  The content of the response is printed on
stdout.  Error messages are printed on stderr.  The program returns a
status value indicating the number of URLs that failed.
.PP
The options are:
.IP "\-m <method>" 4
.IX Item "-m <method>"
Set which method to use for the request.  If this option is not used,
then the method is derived from the name of the program.
.IP "\-f" 4
.IX Item "-f"
Force request through, even if the program believes that the method is
illegal.  The server might reject the request eventually.
.IP "\-b <uri>" 4
.IX Item "-b <uri>"
This \s-1URI\s0 will be used as the base \s-1URI\s0 for resolving all relative URIs
given as argument.
.IP "\-t <timeout>" 4
.IX Item "-t <timeout>"
Set the timeout value for the requests.  The timeout is the amount of
time that the program will wait for a response from the remote server
before it fails.  The default unit for the timeout value is seconds.
You might append \*(L"m\*(R" or \*(L"h\*(R" to the timeout value to make it minutes or
hours, respectively.  The default timeout is '3m', i.e. 3 minutes.
.IP "\-i <time>" 4
.IX Item "-i <time>"
Set the If-Modified-Since header in the request. If \fItime\fR is the
name of a file, use the modification timestamp for this file. If
\&\fItime\fR is not a file, it is parsed as a literal date. Take a look at
HTTP::Date for recognized formats.
.IP "\-c <content\-type>" 4
.IX Item "-c <content-type>"
Set the Content-Type for the request.  This option is only allowed for
requests that take a content, i.e. \s-1POST\s0 and \s-1PUT\s0.  You can
force methods to take content by using the \f(CW\*(C`\-f\*(C'\fR option together with
\&\f(CW\*(C`\-c\*(C'\fR.  The default Content-Type for \s-1POST\s0 is
\&\f(CW\*(C`application/x\-www\-form\-urlencoded\*(C'\fR.  The default Content-type for
the others is \f(CW\*(C`text/plain\*(C'\fR.
.IP "\-p <proxy\-url>" 4
.IX Item "-p <proxy-url>"
Set the proxy to be used for the requests.  The program also loads
proxy settings from the environment.  You can disable this with the
\&\f(CW\*(C`\-P\*(C'\fR option.
.IP "\-P" 4
.IX Item "-P"
Don't load proxy settings from environment.
.IP "\-H <header>" 4
.IX Item "-H <header>"
Send this \s-1HTTP\s0 header with each request. You can specify several, e.g.:
.Sp
.Vb 4
\&    lwp\-request \e
\&        \-H \*(AqReferer: http://other.url/\*(Aq \e
\&        \-H \*(AqHost: somehost\*(Aq \e
\&        http://this.url/
.Ve
.IP "\-C <username>:<password>" 4
.IX Item "-C <username>:<password>"
Provide credentials for documents that are protected by Basic
Authentication.  If the document is protected and you did not specify
the username and password with this option, then you will be prompted
to provide these values.
.PP
The following options controls what is displayed by the program:
.IP "\-u" 4
.IX Item "-u"
Print request method and absolute \s-1URL\s0 as requests are made.
.IP "\-U" 4
.IX Item "-U"
Print request headers in addition to request method and absolute \s-1URL\s0.
.IP "\-s" 4
.IX Item "-s"
Print response status code.  This option is always on for \s-1HEAD\s0 requests.
.IP "\-S" 4
.IX Item "-S"
Print response status chain. This shows redirect and authorization
requests that are handled by the library.
.IP "\-e" 4
.IX Item "-e"
Print response headers.  This option is always on for \s-1HEAD\s0 requests.
.IP "\-E" 4
.IX Item "-E"
Print response status chain with full response headers.
.IP "\-d" 4
.IX Item "-d"
Do \fBnot\fR print the content of the response.
.IP "\-o <format>" 4
.IX Item "-o <format>"
Process \s-1HTML\s0 content in various ways before printing it.  If the
content type of the response is not \s-1HTML\s0, then this option has no
effect.  The legal format values are; \fItext\fR, \fIps\fR, \fIlinks\fR,
\&\fIhtml\fR and \fIdump\fR.
.Sp
If you specify the \fItext\fR format then the \s-1HTML\s0 will be formatted as
plain latin1 text.  If you specify the \fIps\fR format then it will be
formatted as Postscript.
.Sp
The \fIlinks\fR format will output all links found in the \s-1HTML\s0 document.
Relative links will be expanded to absolute ones.
.Sp
The \fIhtml\fR format will reformat the \s-1HTML\s0 code and the \fIdump\fR format
will just dump the \s-1HTML\s0 syntax tree.
.Sp
Note that the \f(CW\*(C`HTML\-Tree\*(C'\fR distribution needs to be installed for this
option to work.  In addition the \f(CW\*(C`HTML\-Format\*(C'\fR distribution needs to
be installed for \fI\-o text\fR or \fI\-o ps\fR to work.
.IP "\-v" 4
.IX Item "-v"
Print the version number of the program and quit.
.IP "\-h" 4
.IX Item "-h"
Print usage message and quit.
.IP "\-a" 4
.IX Item "-a"
Set text(ascii) mode for content input and output.  If this option is not
used, content input and output is done in binary mode.
.PP
Because this program is implemented using the \s-1LWP\s0 library, it will
only support the protocols that \s-1LWP\s0 supports.
.SH "SEE ALSO"
.IX Header "SEE ALSO"
lwp-mirror, \s-1LWP\s0
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
Copyright 1995\-1999 Gisle Aas.
.PP
This library is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
.SH "AUTHOR"
.IX Header "AUTHOR"
Gisle Aas <gisle@aas.no>