Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Source Code for Node.js module HTTP

Tags:

node.js

Regarding the source code for Node.js core modules. Supposedly, the npm installation only comes with a binary version of module HTTP. After googling for the source, I see the claim that the HTTP source code can be found on github, but I do not see it there. Where might one find the source for module HTTP? . . . Thanks for any assistance, Tallisfan

like image 657
Tallisfan Avatar asked Sep 23 '16 02:09

Tallisfan


People also ask

Is HTTP a module in Node js?

Node.js has a built-in module called HTTP, which allows Node.js to transfer data over the Hyper Text Transfer Protocol (HTTP).

How can I see the source code in Node js?

The source code can be found at https://github.com/nodejs/node. This assumes that you are a JavaScript developer approaching the project. If you are a C++ programmer, for example, your path will likely be different.

What is Node js source code?

js is an open-source, cross-platform, back-end JavaScript runtime environment that runs on a JavaScript Engine (i.e. V8 engine) and executes JavaScript code outside a web browser, which was designed to build scalable network applications.


2 Answers

I believe what you are looking for lies in the /lib dir:

https://github.com/nodejs/node/tree/master/lib

like image 97
mattgreen Avatar answered Oct 21 '22 22:10

mattgreen


The source is mixed with rest of the library. If you really need the source code, here's the http.js file found in the node.js lib folder that also contains most of the other http modules (see the remaining files starting with _http).

If you just needed to know what functions are available and what each of them do, I'd recommend referring to the documentation instead.

like image 3
blr Avatar answered Oct 21 '22 21:10

blr