www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - cURL alternative for enable javascript

reply "xky" <mozirikan gmail.com> writes:
hello! :)

Well.. yes. cURL couldn't enable javascript.
How can i use other library alternative cURL for D ?

regards,
Sep 03 2015
parent reply Rikki Cattermole <alphaglosined gmail.com> writes:
On 04/09/15 2:09 AM, xky wrote:
 hello! :)

 Well.. yes. cURL couldn't enable javascript.
 How can i use other library alternative cURL for D ?

 regards,
Curl is meant to transfer data and in this case, download files over http. It is not meant to render them via JavaScript. If you are wanting rendering which by the sounds you are by JavaScript then you are entering complicated and not so nice area of programming. You may get what you want by e.g. PhantomJS[0], of course you could set it up so that it could do what ever you want externally to your app. Of course then you would be limited to another process/files required. This problem is not limited to D. Even in C++ you would have to think twice about doing this. Of course somebody may know a better way. [0] http://phantomjs.org/
Sep 03 2015
parent "Laeeth Isharc" <Laeeth.nospam nospam-laeeth.com> writes:
On Thursday, 3 September 2015 at 14:17:28 UTC, Rikki Cattermole 
wrote:
 On 04/09/15 2:09 AM, xky wrote:
 hello! :)

 Well.. yes. cURL couldn't enable javascript.
 How can i use other library alternative cURL for D ?

 regards,
Curl is meant to transfer data and in this case, download files over http. It is not meant to render them via JavaScript. If you are wanting rendering which by the sounds you are by JavaScript then you are entering complicated and not so nice area of programming. You may get what you want by e.g. PhantomJS[0], of course you could set it up so that it could do what ever you want externally to your app. Of course then you would be limited to another process/files required. This problem is not limited to D. Even in C++ you would have to think twice about doing this. Of course somebody may know a better way. [0] http://phantomjs.org/
And since D can talk to Python via PyD, it's not hard to embed phantomjs or the like as a script within your D code.
Sep 03 2015