libduvet/http/multipart
Types
A file part of a multipart request.
pub type FilePart {
FilePart(field: String, bytes: BitArray, filename: String)
}
Constructors
-
FilePart(field: String, bytes: BitArray, filename: String)
Values
pub fn basename(path: String) -> String
A file’s name without its folders: on Windows a path may separate them with either slash.
pub fn encode(
fields: List(#(String, String)),
files: List(FilePart),
) -> Form
Encodes the form, with the fields first and the files after, as Dart’s multipart encoder writes it.
pub const max_bio_length: Int
How long a bio may be once trimmed, in characters as the API counts them: Unicode code points, so an emoji such as 😀 is one.
pub fn media_type_of(filename: String) -> String
The media type a file part declares, from its name.
pub const members_page_size: Int
How many members a page of the space-members endpoint has.
pub const piece_size: Int
A request body’s bytes in pieces of at most this many bytes, so that progress and the idle timeout follow what the socket takes.