std1.0.0-beta-7 SafeC docs

std :: http::multipart

Struct std::MultipartBuilder

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

struct MultipartBuilder {
    struct String boundary;
    struct String body;
}

Builds a multipart/form-data body.

Fields

§struct String boundarysource
§struct String bodysource

Methods

§static struct MultipartBuilder new()source · definition

A random boundary.

§void add_field(const &char name, const &char value)source · definition
§void add_file( const &char name, const &char filename, const &char content_type, []const unsigned char data, )source · definition
§struct String content_type() constsource · definition

"multipart/form-data; boundary=..." for the Content-Type header.

§void finish()source · definition

Appends the closing delimiter; 'body' is then complete.

§void drop()source · definition
§void free() consumesource · definition

= drop()