Minimal multiprotocol TCP/IP client.
Go to file
2023-03-25 17:06:15 -04:00
src I'll be honest, I completely forgot what I changed this time. Sorry. 2023-03-25 17:06:15 -04:00
CHANGES See CHANGES. 2023-02-19 16:44:19 -04:00
default I'll be honest, I completely forgot what I changed this time. Sorry. 2023-03-25 17:06:15 -04:00
LICENSE Rewrite main (again). Add Gopher support. Add TLS support. 2022-11-30 10:34:31 -04:00
README Update README. 2023-02-19 16:59:50 -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. You can build it with any implementation of
TLS so long as there's a libtls built atop it. Right now, that's Bear,
Libre, and Open at the least.

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.