std1.0.0-beta-7 SafeC docs

Module http::multipart

#include <std/http/multipart.h> source

multipart/form-data (RFC 7578): parsing an HTML form upload on the server, building one for a client request.

int ok = 0;
struct MultipartForm form = std::MultipartForm::from_request(req, &ok);
match (form.get("avatar")) {
    case some(p): { /* p.filename, p.content_type, p.data (binary-safe String) */ }
    case null: { }
}
form.free();

Structs

MultipartPart
MultipartForm
MultipartBuilderBuilds a multipart/form-data body.