From 760bccc3ad4b80960f414e7f464c3f62f4885bb3 Mon Sep 17 00:00:00 2001 From: Shunsuke Mie Date: Thu, 3 Oct 2019 21:23:10 +0900 Subject: [PATCH] fix a sample code of multipart/form-data POST data in README.md. --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d5c7114..e3bca07 100644 --- a/README.md +++ b/README.md @@ -77,12 +77,13 @@ svr.set_error_handler([](const auto& req, auto& res) { ```cpp svr.Post("/multipart", [&](const auto& req, auto& res) { auto size = req.files.size(); - auto ret = req.has_file("name1")); + auto ret = req.has_file("name1"); const auto& file = req.get_file_value("name1"); // file.filename; // file.content_type; - auto body = req.body.substr(file.offset, file.length)); -}) + auto body = req.body.substr(file.offset, file.length); +}); + ``` ### Stream content with Content provider