v2026.5.3
All Bundles
Bundle Lightweight embedded web server. Handles inbound HTTP requests with typed access to method, path, headers, and body; Response supports content-type, compression, redirects, and cookies. Compile with -lib net_server.

ContentType

Multipart content type

Operations

GetContent #

Get MIME content

method : public : GetContent() ~ Byte[]

Return

TypeDescription
ByteMIME bytes

Example

parts := Web.Server.Request->ParseMultipartEncoding(request->ReadBody());
if(parts <> Nil & parts->Size() > 0) {
  part := parts->Get(0);
  data := part->GetContent();
  data->Size()->PrintLine();  # byte count of uploaded data
};

GetHeader #

Get MIME content header

method : public : GetHeader(name:String) ~ String

Parameters

NameTypeDescription
nameStringheader name

Return

TypeDescription
Stringheader value

Example

parts := Web.Server.Request->ParseMultipartEncoding(request->ReadBody());
if(parts <> Nil & parts->Size() > 0) {
  part := parts->Get(0);
  disp := part->GetHeader("content-disposition");
  disp->PrintLine();  # form-data; name="file"; filename="upload.txt"
};