digitalmars.D.learn - httpS post fail at tango
I use Tango's example from http://www.dsource.org/projects/tango/docs/stable/ // open a web-page for posting (see HttpGet for simple reading) auto post = new HttpPost ("http://yourhost/yourpath"); // send, retrieve and display response Cout (cast(char[]) post.write("posted data", "text/plain")); but it cannot post to a http's' address. Can anyone advise me, i cannot find any other information online. Thanks
Jun 26 2014
On Thursday, 26 June 2014 at 16:33:57 UTC, JJDuck wrote: I tried to use phobos , but there is no such function exists for posting to https too....
Jun 26 2014
On Thursday, 26 June 2014 at 17:07:30 UTC, JJDuck wrote:On Thursday, 26 June 2014 at 16:33:57 UTC, JJDuck wrote: I tried to use phobos , but there is no such function exists for posting to https too....With Phobos, you can use http://dlang.org/phobos/std_net_curl.html#post. Depending on the SSL certificate (i.e., if it's self-signed), you may need to use the C API to cURL and disable SSL verification (http://dlang.org/phobos/etc_c_curl.html). With curl, if it works for http it works for https, provided no certificate issues are found. Tango isn't really used much anymore and Phobos is the official standard library now (though you can use Tango alongside it), so you'd probably have a hard time finding help for Tango on these forums.
Jun 29 2014