The introduction of BodyParts again showed that not all entity types are
useful for every kind of context. There are now these contexts where
HttpEntities are used:
- requests
- responses
- body parts
And several kinds of entities:
- Strict
- Default
- Chunked
- CloseDelimited
- IndefiniteLength
To increase type safety of the API marker-interfaces are introduced defining
which kinds of entities can be used in which contexts:
- RequestEntity: Strict, Default, Chunked
- ResponseEntity: Strict, Default, Chunked, CloseDelimited
- BodyPartEntity: Strict, Default, IndefiniteLength
Also, to be able still to provide abstractions over some kinds of entities
additional auxiliary interfaces were necessary:
- MessageEntity = RequestEntity >: ResponseEntity: Strict, Default, Chunked (type alias for RequestEntity)
- UniversalEntity = RequestEntity with ResponseEntity with BodyPartEntity = Strict, Default