mirror of
https://github.com/dlang/phobos.git
synced 2025-04-27 21:51:40 +03:00
std.net.curl: add missing import to examples
Fixes issue 23724 - HTTP.onReceive example does not compile
This commit is contained in:
parent
3acf18c099
commit
ec947ebc0f
1 changed files with 6 additions and 6 deletions
|
@ -2171,7 +2171,7 @@ private mixin template Protocol()
|
|||
*
|
||||
* Example:
|
||||
* ----
|
||||
* import std.net.curl, std.stdio;
|
||||
* import std.net.curl, std.stdio, std.conv;
|
||||
* auto client = HTTP("dlang.org");
|
||||
* client.onReceive = (ubyte[] data)
|
||||
* {
|
||||
|
@ -2817,7 +2817,7 @@ struct HTTP
|
|||
*
|
||||
* Example:
|
||||
* ----
|
||||
* import std.net.curl, std.stdio;
|
||||
* import std.net.curl, std.stdio, std.conv;
|
||||
* auto client = HTTP("dlang.org");
|
||||
* client.onReceive = (ubyte[] data)
|
||||
* {
|
||||
|
@ -3054,7 +3054,7 @@ struct HTTP
|
|||
*
|
||||
* Example:
|
||||
* ----
|
||||
* import std.net.curl, std.stdio;
|
||||
* 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];
|
||||
|
@ -3073,7 +3073,7 @@ struct HTTP
|
|||
*
|
||||
* Example:
|
||||
* ----
|
||||
* import std.net.curl, std.stdio;
|
||||
* 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....";
|
||||
|
@ -3145,7 +3145,7 @@ struct HTTP
|
|||
*
|
||||
* Example:
|
||||
* ----
|
||||
* import std.net.curl, std.stdio;
|
||||
* import std.net.curl, std.stdio, std.conv;
|
||||
* auto http = HTTP("dlang.org");
|
||||
* http.onReceive = (ubyte[] data) { writeln(to!(const(char)[])(data)); return data.length; };
|
||||
* http.onReceiveHeader = (in char[] key, in char[] value) { writeln(key, " = ", value); };
|
||||
|
@ -4551,7 +4551,7 @@ struct Curl
|
|||
*
|
||||
* Example:
|
||||
* ----
|
||||
* import std.net.curl, std.stdio;
|
||||
* import std.net.curl, std.stdio, std.conv;
|
||||
* Curl curl;
|
||||
* curl.initialize();
|
||||
* curl.set(CurlOption.url, "http://dlang.org");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue