postContent

Call post and return response content.

postContent
(
A...
)
(
string url
,)

Examples

import std.json;
import std.string;
globalLogLevel(LogLevel.info);
info("Test postContent");
auto r = postContent("http://httpbin.org/post", `{"a":"b", "c":1}`, "application/json");
assert(parseJSON(r.data).object["json"].object["c"].integer == 1);
r = postContent("ftp://speedtest.tele2.net/upload/TEST.TXT", "test, ignore please\n".representation);
assert(r.length == 0);

Meta