mirror of
https://github.com/apple/swift-http-types
synced 2026-11-22 04:30:40 +00:00
### Motivation HTTP/2 and HTTP/3 both carry a numeric error code to say why a stream or a connection was terminated. HTTPTypes has no currency type for either, so adopters passed bare integers around or defined their own. ### Modifications Add HTTP2ErrorCode and HTTP3ErrorCode. ### Result HTTP/2 and HTTP/3 error codes are first-class currency types. --------- Co-authored-by: Fabian Fett <fabianfett@apple.com>