From b6006797f4d7e26ff8b21481367323b7c40b1be2 Mon Sep 17 00:00:00 2001 From: Dominic Date: Mon, 20 Apr 2020 22:34:39 +0200 Subject: [PATCH] update readme --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8ebf802..e0aeb60 100644 --- a/README.md +++ b/README.md @@ -78,11 +78,14 @@ struct ImageResource; #[derive(FromBody, RequestBody)] #[supported_types(mime::IMAGE_GIF, mime::IMAGE_JPEG, mime::IMAGE_PNG)] -struct RawImage(Vec); +struct RawImage { + content: Vec, + content_type: Mime +} #[rest_create(ImageResource)] fn create(_state : &mut State, body : RawImage) -> Raw> { - Raw::new(body.0, mime::APPLICATION_OCTET_STREAM) + Raw::new(body.content, body.content_type) } ```