pub fn binary<S: AsRef<str>>(content: Bytes, content_type: S) -> ResultExpand description
Creates a binary response for serving binary data over HTTP.
§Parameters
content: Abytes::Bytesobject containing the binary content.content_type: AnAsRef<str>(&str/String) specifying the MIME type of the content (e.g.,application/pdf,image/png).
§Example
let content = bytes::Bytes::from("This is the content of the file.");
ft_sdk::data::binary(content, "text/plain").unwrap();