Minimal multiprotocol TCP/IP client.
Go to file
2023-02-19 16:44:19 -04:00
src See CHANGES. 2023-02-19 16:44:19 -04:00
CHANGES See CHANGES. 2023-02-19 16:44:19 -04:00
LICENSE Rewrite main (again). Add Gopher support. Add TLS support. 2022-11-30 10:34:31 -04:00
README See CHANGES. 2023-02-19 16:44:19 -04:00

What is it?
===========
Terrible attempt at writing a smaller replacement for cURL. Will include
a library in the future to make network operations in C convenient. 

Why?
====
Because there weren't any HTTPS clients that were small, readable, and
portable with the features I needed. Also I needed to learn sockets.

Okay, but you should still use cURL in your other projects.
===========================================================
No, I shouldn't. cURL is huge, doesn't build with smaller compilers, and
has way too many features. Apportate is a cantrip, cURL is a level nine
spell.

What's apportate's featureset, anyway?
======================================
Right now, it retrieves data over HTTP or Gopher, and can support TLS,
at least when it comes to HTTPS. I'd like a more general approach to
TLS support in the future.

Its source code is small (< 500 lines of C total according to cloc right
now) and uses only POSIX routines -- there's no temptation to use GNU
or BSD features because I develop against musl and tcc, and I don't even
have the Linux manpages on any of my systems.

Furthermore, it has a relatively well-modularized design, at least for
my current ability. It could be much better, if I had more experience,
but it's still quite easy to add support for new protocols. For example,
adding support for Gopher took me less than five minutes, and required
no real edits to main aside from a kludge to avoid seeking for an HTTP
response header terminator.

Apportate also aims to have actually useful diagnostics; that is,
compared to other tools, apportate aims to only provide useful error
output. In the case of success, it follows the Rule of Silence; on
unrecoverable errors, it aborts immediately. It supports multiple levels
of verbosity, and exposes almost all of its internal operations for debugging..

Its simple design and use should also make it relatively convenient
for inclusion in shell scripts.