In support of the AtprotoOauth family of modular packages, shared helper implementations:
- an HTTPDataResponse type for the return value of an HTTP fetch
- functional affordances for checking the success codes and decoding result and error types
- HTTPFetcher, an abstraction of
URLSession.data(for)to allow mocking of requests for test
- typed HTTP Method and URL shemes
- tryUnwrap
- String -> utf8 Data
- copy bytes from Contiguous bytes (primarily used to get random bytes for use as an identifier or mock data)
Additional, separately-imported products, each isolating its own extra dependency so the base target stays dependency-free:
GermConvenienceURLSession(swift-http-types'HTTPTypesFoundation): theURLSessionconformers toHTTPFetcher/HTTPStreamFetcher,URLSession.manualRedirect(),firstLine(request:)andURLSessionWebSocketConnecting.GermConvenienceHTTPitself never referencesURLSessionor imports FoundationNetworking, so a platform that supplies its own transport depends only on that and never links FoundationNetworkingGermConvenienceUtilities(no extra dependency):expectOne/expectOneOrLesscollection helpers, a shortDatadebug-preview string, andDeleteFuse, a guard that fails further work once a delete has begunGermConvenienceCrypto(swift-crypto): byte/Dataaccessors onDigestGermConvenienceLogging(swift-log):Logger.logError, which carries the error structurally rather than flattening it into the message
We welcome contributions!
Please follow our guidelines for contributing code
To give clarity of what is expected of our members, Germ has adopted the code of conduct defined by the Contributor Covenant. This document is used across many open source communities, and we think it articulates our values well. For more, see the Code of Conduct