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 application/octet-stream. Data is not converted or encoded by this method.

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

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 = [1,2,3,4,5];
http.perform();

Meta