summaryrefslogtreecommitdiff
path: root/sys/man/1/hget
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@gmx.de>2012-10-18 14:38:07 +0200
committercinap_lenrek <cinap_lenrek@gmx.de>2012-10-18 14:38:07 +0200
commit7c3ea4360b64579ce63d85337fdefdbba565f312 (patch)
tree012b0991bf79576d170ff1aae4264ebaa8c273d4 /sys/man/1/hget
parent909efb22c516c3c685159a954f164469a064e5a7 (diff)
hpost: add -l flag to get location url after POST
Diffstat (limited to 'sys/man/1/hget')
-rw-r--r--sys/man/1/hget61
1 files changed, 40 insertions, 21 deletions
diff --git a/sys/man/1/hget b/sys/man/1/hget
index 393752aa6..70a094b91 100644
--- a/sys/man/1/hget
+++ b/sys/man/1/hget
@@ -4,6 +4,8 @@ hget, hpost \- retrieve, post to a web page corresponding to a url
.SH SYNOPSIS
.B hget
[
+.B -l
+|
.B -o
.I file
] [
@@ -25,10 +27,8 @@ hget, hpost \- retrieve, post to a web page corresponding to a url
.PP
.B hpost
[
-.B -u
-]
-.I url
-[
+.B -l
+] [
.B -g
.I action
] [
@@ -38,6 +38,10 @@ hget, hpost \- retrieve, post to a web page corresponding to a url
.B -m
.I action
] [
+.B -u
+]
+.I url
+[
.I name:value
|
.I name@file
@@ -48,8 +52,10 @@ hget, hpost \- retrieve, post to a web page corresponding to a url
retrieves the web page specified by the URL
.I url
and writes it, absent the
+.B -l
+and
.B -o
-option, to standard output.
+options, to standard output.
.PP
The
.I url
@@ -77,6 +83,18 @@ argument as a string or alternatively with
read from standard input.
.PP
The
+.B -l
+option causes
+.I hget
+and
+.I hpost
+to print the location URL from the transactoin response
+instead of retriving the the body data. This is usefull
+for HTTP POST transactions that redirect to a URL containing
+the prosted data so we wont refetch the data we just uploaded
+to the site.
+.PP
+The
.B -o
option is used to keep a local file in sync with a
web page. If the web page has been modified later than the
@@ -112,17 +130,6 @@ flags, then
is invoked to execute the transaction submitting the form data.
.PP
The
-.B -u
-flag sets the target URL to
-.I url.
-As the
-.I url
-parameter is always required, it can be optionally specified
-in the first argument without the
-.B -u
-flag.
-.PP
-The
.B -g
and
.B -p
@@ -133,6 +140,18 @@ flag sets the form method to POST and its enctype to
In all cases, the form action URL is set to
.I action.
.PP
+The
+.B -u
+flag sets the target URL to
+.I url.
+As the
+.I url
+parameter is always required, the
+.B -u
+flag can be omited when
+.I url
+follows directly after the last option if any.
+.PP
The remaining arguments of the form
.B name:value
are interpreted as text form field names and values to be submitted. An
@@ -152,21 +171,21 @@ Retrieve the commands needed to submit a form, which may then be
edited and sent.
.IP
.EX
-% hpost http://p.intma.in
-/bin/hpost -u http://p.intma.in -p paste.cgi text:
+% hpost -l http://p.intma.in
+/bin/hpost -l -u http://p.intma.in -p paste.cgi text:
.EE
.PP
Manually specify fields to be sent to a given
.I url.
.IP
.EX
-% hpost -u http://p.intma.in -p paste.cgi text:'test post'
+% hpost -l -u http://p.intma.in -p paste.cgi text:'test post'
.EE
.PP
-Upload a file.
+Upload a file, print the resulting URL
.IP
.EX
-% hpost http://i.intma.in file@/tmp/screen.png | rc >/dev/null
+% hpost -l http://i.intma.in file@/tmp/screen.png | rc
.EE
.SH SOURCE
.B /rc/bin/hget