Declarative Requests 2.0 — Open Spec Done Right
▎
▎ Complete redesign around one idea: describe your backend as a Swift enum — endpoints, methods, paths, needsAuth — and compose requests in layers: definition → session (authorized) → environment (.base) → .request.
▎
▎ - RequestState holds exactly one URLRequest; everything else is a projection into it
▎ - Blocks are values; construction never throws — only .request does
▎ - Base URL path is always a prefix (slash-agnostic), applied last: endpoints are definition, base is configuration
▎ - Zero dependencies, zero custom error types — system errors propagate untouched
▎ - ~660 lines, 71 tests; the README's flagship example lives verbatim in the test suite
▎
▎ Breaking changes from 1.0: typed-header DSL, MIME parameter machinery, streamed multipart, and curlCommand removed; Accept/ContentType became MIMEType..accept/.contentType; CachePolicy/NetworkServiceType/AllowAccess/HTTPShouldHandleCookies ride RequestMutation now.
Full Changelog: 1.0.0...2.0.0