[−][src]Function octocrab::format_media_type
pub fn format_media_type(media_type: impl AsRef<str>) -> String
Formats a media type from it's name into the full value for the
Accept
header.
assert_eq!(octocrab::format_media_type("html"), "application/vnd.github.v3.html+json"); assert_eq!(octocrab::format_media_type("json"), "application/vnd.github.v3.json"); assert_eq!(octocrab::format_media_type("patch"), "application/vnd.github.v3.patch");