use bytes::Buf; use futures_util::{Stream, StreamExt}; use warp::{reply::Response, Filter, Reply};
#[tokio::main] asyncfn main() { // Running curl -T /path/to/a/file 'localhost:3030/' should echo back the content of the file, // or an HTTP 413 error if the configured size limit is exceeded. let route = warp::body::content_length_limit(65536)
.and(warp::body::stream())
.then(handler);
warp::serve(route).run(([127, 0, 0, 1], 3030)).await;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.