value

The HTTP field value as a UTF-8 string.

HTTPField.swift:97
var value: String { get set }

When setting the value, invalid bytes (defined in RFC 9110) are converted into space characters.

https://www.rfc-editor.org/rfc/rfc9110.html#name-field-values

If the field is not UTF-8 encoded, withUnsafeBytesOfValue can be used to access the underlying bytes of the field value.