Curl: Or the equivalent of - For Server Side Javascript

二次信任 提交于 2019-12-12 01:01:14

问题


Popular scripting languages such as Python and PHP have extensions that utilize the Curl library- but little documentation exists for the newer Javascript server side languges.

I was wondering --is there a library or hack that can mimic the behavior of Curl in server side Javascript frameworks such as NodeJs and PhantomJs?

If no: how can Curl-like requests be made in NodeJs? Or PhantomJs?

Also -and most importantly:

Is there a "pure javascript" implementation that could work in the runtime of any server-side Javascript framework?


回答1:


Node.js has an HTTP client in its core library.

http://nodejs.org/api/http.html



来源:https://stackoverflow.com/questions/16241615/curl-or-the-equivalent-of-for-server-side-javascript

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!