1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
.Dd December 13, 2019
.Dt HURL 1
.Os
.Sh NAME
.Nm hurl
.Nd HTTP/HTTPS/Gopher/Gemini file grabber
.Sh SYNOPSIS
.Nm
.Op Fl H Ar headers
.Op Fl l
.Op Fl m Ar filesize
.Op Fl t Ar timeout
.Ar url
.Sh DESCRIPTION
.Nm
fetches data and writes it to stdout.
.Nm
supports the protocols: HTTP, HTTPS, Gopher and Gemini.
.Pp
The options are as follows:
.Bl -tag -width Ds
.It Fl H Ar headers
Add headers to HTTP or HTTPS requests.
This is the raw data appended to the request header.
This can be multiple lines, all but the last line should not end with CR LF.
.It Fl l
Enable legacy ciphers and negotiation for TLS (default off).
.It Fl m Ar filesize
Maximum size of the data in bytes.
.It Fl t Ar timeout
Maximum time for the connection and fetching the data in seconds.
This sets up a timer that kills the connection after
.Ar timeout
seconds.
The default is to use no timer.
.El
.Pp
For HTTP, HTTPS and Gemini it will write the data except the header to stdout when the
HTTP statuscode is "200 OK" or Gemini statuscode is "20" and exit with
statuscode 0 when all data is successfully written.
When the header is retrieved but it is not "200 OK" or "20" it will write the
header to stderr and exit with a non-zero statuscode.
.Pp
For Gopher it will write the data to stdout and exit with statuscode 0 when all
data is successfully written.
.Sh SEE ALSO
.Xr ftp 1 ,
.Xr nc 1
.Sh AUTHORS
.An Hiltjo Posthuma Aq Mt hiltjo@codemadness.org
|