connection property

ConnectionHeaderType? connection
final

The Connection option to add, or null when none is needed. A head writer puts it on a line of its own, beside any value the response sets itself (RFC 9110 5.3).

ConnectionHeaderType.close when closeAfter and the response does not say close itself (RFC 9112 9.6). ConnectionHeaderType.keepAlive when an HTTP/1.0 connection stays open and the response sets no value of its own, since such a client takes the connection as closed unless told (RFC 9112 C.2.2).

Implementation

final ConnectionHeaderType? connection;