in a handler such as ...
\n#[put(\"/\", data = \"<form>\")]\nasync fn put(mut form: Form<OneStatement<'_>>) -> MyResponse {}
fail w/ 415 (Unsupported Media Type)
presumably b/c Rocket doesn't recognize the multipart/mixed
content-type header and consequently doesn't route the Request to the handler.
q1/ is there already some Rocket feature that makes this possible?
\none alternative would be to handle the decoding and partitioning of the incoming data myself w/ the Streaming capability.
\nq2/ is this the right approach? and if it is...
\nq3/ --although this is not specifically related to Rocket-- can you recommend any 3rd-party crate(s) that do this and work well w/ Rocket?
\nthanks in advance + cheers;
\nrsn
Well, I've taken a stab at it (and released as v0.1.1). Let me know if there are any additional features that might be useful.
","upvoteCount":0,"url":"https://github.com/rwf2/Rocket/discussions/2811#discussioncomment-9848244"}}}-
hi there, i'm trying to implement some IEEE standard REST API that mandates handling my tests w/ Rocket 5.1 so far indicate that using a Form like this one... use rocket::FromForm;
#[derive(Debug, FromForm)]
struct OneStatement<'r> {
doc: &'r str,
files: Option<Vec<TempFile<'r>>>,
} in a handler such as ... #[put("/", data = "<form>")]
async fn put(mut form: Form<OneStatement<'_>>) -> MyResponse {} fail w/ q1/ is there already some Rocket feature that makes this possible? one alternative would be to handle the decoding and partitioning of the incoming data myself w/ the Streaming capability. q2/ is this the right approach? and if it is... q3/ --although this is not specifically related to Rocket-- can you recommend any 3rd-party crate(s) that do this and work well w/ Rocket? thanks in advance + cheers; |
Beta Was this translation helpful? Give feedback.
-
I believe it's actually failing b/c the
Not right now. It's a logical enhancement for my |
Beta Was this translation helpful? Give feedback.
Well, I've taken a stab at it (and released as v0.1.1). Let me know if there are any additional features that might be useful.