formData - multiple declarations

Function formData

Helper to create form elements from File.

auto MultipartForm.FormData formData (
  string name,
  std.stdio.File f,
  string[string] parameters = cast(string[string])null
);

Parameters

NameDescription
name name of the field in form
f opened std.stio.File to send to server
parameters optional parameters (most important are "filename" and "Content-Type")

Function formData

Helper to create form elements from ubyte[].

auto MultipartForm.FormData formData (
  string name,
  ubyte[] b,
  string[string] parameters = cast(string[string])null
);

Parameters

NameDescription
name name of the field in form
b data to send to server
parameters optional parameters (can be "filename" and "Content-Type")

Function formData

auto MultipartForm.FormData formData (
  string name,
  string b,
  string[string] parameters = cast(string[string])null
);