41 minutes ago · 5 min read1070 words · Tech · hide · 0 comments

I’ve been refining the API for libdav. Two big tasks were involved here: (1) more flexible generic types for the async helpers and (2) tidying up error types. Flexible async types[permalink] The core of libdav follows a sans I/O philosophy: it produces requests and parses response, leaving network transport up to the caller. This kind of design is clean, flexible, and especially convenient for unit testing. Not to mention that it makes the library actually usable with any HTTP client implementation. For typical consumers writing async Rust code with the hyper HTTP library, writing code to use a sans-io library is somewhat tedious, so libdav provides the necessary abstractions for this too, as an upper layer. The existing implementation could be used with any client which returned a regular HTTP response. It never occurred to me, but this mean it’s unusable with a client that returns a compressed HTTP response, and using compressing for WebDAV (a text-based protocol) provides immense…

No comments yet. Log in to reply on the Fediverse. Comments will appear here.