Move http man page to Cytoplasm from Telodendria.

This commit is contained in:
Jordan Bancino 2023-11-01 08:33:37 -04:00
parent 75ecb22724
commit 03fe5ca355
1 changed files with 70 additions and 0 deletions

man/man1/http.1 Normal file
View File

@ -0,0 +1,70 @@
.Dd $Mdocdate: March 12 2023 $
.Dt HTTP 1
.Os Telodendria Project
.Nm http
.Nd A simple command line utility for making HTTP requests.
.Op Fl i
.Op Fl X Ar method
.Op Fl H Ar header
.Op Fl d Ar data
Is a command line HTTP client. It is very heavily inspired by
.Xr curl 1 ,
and even uses the same flag names when possible. However,
is designed to be much simpler than
.Xr curl 1 ,
and is built on Telodendria's own
.Xr HttpClient 3
API. It primarily exists to test
.Xr HttpClient 3
.Xr HttpServer 3 ,
and make development of Telodendria possible without having
to install any external tools.
The options are as follows:
.Bl -tag -width Ds
.It Fl i
Display the response headers before writing the body.
.It Fl X Ar method
Set the request method. This can be any of the options
allowed by the
.Xr Http 3
API; unlike
.Xr curl 1 ,
it cannot be any arbitrary string.
.It Fl H Ar header
Set a request header, in the form of ``Header: value''. This option
can be set multiple times to add multiple request headers.
.It Fl d Ar data
Send data to the server in the request body. If
.Ar data
starts with ``@'', then the file specified after is opened
and read in. If it is ``@-'', then standard input is used.
Otherwise, the string is passed to the server as-is.
also requires a
to make the request to. The URL is parsed by the
.Xr Uri 3
API, so consult that page for the syntax of URLs.
exits with
if all command line options were valid, the request was
made successfully, and the server returns an HTTP code
that indicates success. It exits with
in all other scenarios.
.Xr HttpClient 3 ,
.Xr Uri 3