HTTP.postData

Specifying data to post when not using the onSend callback.

The data is NOT copied by the library. Content-Type will default to text/plain. Data is not converted or encoded by this method.

  1. const(void)[] postData [@property setter]
  2. const(char)[] postData [@property setter]
    struct HTTP
    @property
    void
    postData
    (
    const(char)[] data
    )

Examples

import std.net.curl, std.stdio, std.conv;
auto http = HTTP("http://www.mydomain.com");
http.onReceive = (ubyte[] data) { writeln(to!(const(char)[])(data)); return data.length; };
http.postData = "The quick....";
http.perform();

Meta