re: Where to Put Response Metadata - Envelope or HTTP Headers? VIEW POST


One issue is that the type of values passed through HTTP headers is always a string.


It's still a string, a string representation of an integer, but a string none the less.


The body is also a string, of a HTTP request and response.


Yes, body is a raw data that you can serialize to represent values with types (usually according to Content-Type header).

See RFC 723.

Historically, HTTP has allowed field content with text in the ISO-8859-1 charset [ISO-8859-1], supporting other charsets only through use of [RFC2047] encoding. In practice, most HTTP header field values use only a subset of the US-ASCII charset [USASCII]. Newly defined header fields SHOULD limit their field values to US-ASCII octets. A recipient SHOULD treat other octets in field content (obs-text) as opaque data.

The body of http message can be anything you like... But headers not.

code of conduct - report abuse