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) } ```