Module rhymuweb::coding [−][src]
This module contains helper functions for encoding and decoding the bodies of HTTP requests and responses. There are two kinds of coding: text coding and content coding. Content coding changes the bytes of the body in order to represent it differently; for example, to compress the body to a smaller size. Text coding is how the bytes of the body are interpreted as text, and therefore how it can be converted to/from a Rust string.
Functions
decode_body | Attempt to reverse any content coding that has been performed on the given
message body, as indicated in the given message headers. The content
codings that were performed on the body are listed in the
|
decode_body_as_text | Attempt to decode the given message body as text. This will only work if
the given headers for the message contain a |