Enum micro_http_async::DataType
source ·
[−]Expand description
DataType
This returns the data type of the response, wrapping the response as well
Used mostly for returning static images as bytes
for example, if you’re requesting for a static image from say /static/img.png
,
you would want Bytes(content)
instead of Text(content)
. The API already handles
this for you, but it is worth keeping in mind how it works behind the scenes
Variants
Text(String)
Tuple Fields
0: String
Defines a Text data type - this is for returning text, such as HTML
Bytes(Vec<u8>)
Defines a Bytes data type - this is for returning binary data, such as images