Skip to main content

Module multipart

Module multipart 

Source
Expand description

Encoding a multipart/form-data body (RFC 7578).

Pure: parts in, bytes and a Content-Type out. The boundary is derived from the content rather than drawn at random, so the same parts always encode to the same bytes — which is what makes a dry run worth reading and a recorded test worth asserting on.

Structs§

Encoded
The bytes and the Content-Type header value they must be sent under.

Functions§

encode
Encode parts under a boundary that appears in none of them.