Data to post.
MIME type of the data, for example, "text/plain" or "application/octet-stream". See also: Internet media type on Wikipedia.
import std.net.curl; auto http = HTTP("http://onlineform.example.com"); auto data = "app=login&username=bob&password=s00perS3kret"; http.setPostData(data, "application/x-www-form-urlencoded"); http.onReceive = (ubyte[] data) { return data.length; }; http.perform();
Specify data to post when not using the onSend callback, with user-specified Content-Type.