mirror of https://github.com/rwf2/Rocket.git
Add 'Text', 'Bytes' known media types.
These are aliases to the existing 'Plain' and 'Binary'.
This commit is contained in:
parent
03d759ab90
commit
8d40450f36
|
@ -2,8 +2,10 @@ macro_rules! known_media_types {
|
||||||
($cont:ident) => ($cont! {
|
($cont:ident) => ($cont! {
|
||||||
Any (is_any): "any media type", "*", "*",
|
Any (is_any): "any media type", "*", "*",
|
||||||
Binary (is_binary): "binary data", "application", "octet-stream",
|
Binary (is_binary): "binary data", "application", "octet-stream",
|
||||||
|
Bytes (is_bytes): "binary data", "application", "octet-stream",
|
||||||
HTML (is_html): "HTML", "text", "html" ; "charset" => "utf-8",
|
HTML (is_html): "HTML", "text", "html" ; "charset" => "utf-8",
|
||||||
Plain (is_plain): "plain text", "text", "plain" ; "charset" => "utf-8",
|
Plain (is_plain): "plain text", "text", "plain" ; "charset" => "utf-8",
|
||||||
|
Text (is_text): "plain text", "text", "plain" ; "charset" => "utf-8",
|
||||||
JSON (is_json): "JSON", "application", "json",
|
JSON (is_json): "JSON", "application", "json",
|
||||||
MsgPack (is_msgpack): "MsgPack", "application", "msgpack",
|
MsgPack (is_msgpack): "MsgPack", "application", "msgpack",
|
||||||
Form (is_form): "forms", "application", "x-www-form-urlencoded",
|
Form (is_form): "forms", "application", "x-www-form-urlencoded",
|
||||||
|
@ -95,8 +97,10 @@ macro_rules! known_shorthands {
|
||||||
($cont:ident) => ($cont! {
|
($cont:ident) => ($cont! {
|
||||||
"any" => Any,
|
"any" => Any,
|
||||||
"binary" => Binary,
|
"binary" => Binary,
|
||||||
|
"bytes" => Bytes,
|
||||||
"html" => HTML,
|
"html" => HTML,
|
||||||
"plain" => Plain,
|
"plain" => Plain,
|
||||||
|
"text" => Text,
|
||||||
"json" => JSON,
|
"json" => JSON,
|
||||||
"msgpack" => MsgPack,
|
"msgpack" => MsgPack,
|
||||||
"form" => Form,
|
"form" => Form,
|
||||||
|
|
Loading…
Reference in New Issue