General documentation / cheat sheets for various languages and services

Node.js: http

Example instance of http.IncomingMessage:

{ _readableState: { highWaterMark: 16384, buffer: [], length: 0, pipes: null, pipesCount: 0, flowing: false, ended: false, endEmitted: false, reading: false, calledRead: false, sync: true, needReadable: false, emittedReadable: false, readableListening: false, objectMode: false, defaultEncoding: 'utf8', ranOut: false, awaitDrain: 0, readingMore: false, decoder: null, encoding: null }, readable: true, domain: null, _events: {}, _maxListeners: 10, socket: { _connecting: false, _handle: { fd: 69, writeQueueSize: 0, owner: [Circular], onread: [Function: onread], reading: true }, _readableState: { highWaterMark: 16384, buffer: [], length: 0, pipes: null, pipesCount: 0, flowing: false, ended: false, endEmitted: false, reading: true, calledRead: true, sync: false, needReadable: true, emittedReadable: false, readableListening: false, objectMode: false, defaultEncoding: 'utf8', ranOut: false, awaitDrain: 0, readingMore: false, decoder: null, encoding: null }, readable: true, domain: null, _events: { end: [Object], finish: [Function: onSocketFinish], _socketEnd: [Function: onSocketEnd], drain: [Object], timeout: [Function], error: [Function], close: [Object] }, _maxListeners: 10, _writableState: { highWaterMark: 16384, objectMode: false, needDrain: false, ending: false, ended: false, finished: false, decodeStrings: false, defaultEncoding: 'utf8', length: 0, writing: false, sync: false, bufferProcessing: false, onwrite: [Function], writecb: null, writelen: 0, buffer: [], errorEmitted: false }, writable: true, allowHalfOpen: true, onend: [Function], destroyed: false, bytesRead: 1422, _bytesDispatched: 436, _pendingData: null, _pendingEncoding: '', server: { domain: null, _events: [Object], _maxListeners: 10, _connections: 4, connections: [Getter/Setter], _handle: [Object], _usingSlaves: false, _slaves: [], allowHalfOpen: true, httpAllowHalfOpen: false, timeout: 120000, _connectionKey: '4:0.0.0.0:8080' }, _idleTimeout: 120000, _idleNext: { _connecting: false, _handle: [Object], _readableState: [Object], readable: true, domain: null, _events: [Object], _maxListeners: 10, _writableState: [Object], writable: true, allowHalfOpen: true, onend: [Function], destroyed: false, bytesRead: 1027, _bytesDispatched: 435, _pendingData: null, _pendingEncoding: '', server: [Object], _idleTimeout: 120000, _idleNext: [Object], _idlePrev: [Circular], _idleStart: 1417543369036, _monotonicStartTime: 17484194, parser: [Object], ondata: [Function], _paused: false, _httpMessage: null }, _idlePrev: { _idleNext: [Circular], _idlePrev: [Object] }, _idleStart: 1417543369124, _monotonicStartTime: 17484281, parser: { _headers: [], _url: '', onHeaders: [Function: parserOnHeaders], onHeadersComplete: [Function: parserOnHeadersComplete], onBody: [Function: parserOnBody], onMessageComplete: [Function: parserOnMessageComplete], socket: [Circular], incoming: [Circular], maxHeaderPairs: 2000, onIncoming: [Function] }, ondata: [Function], _paused: false, _httpMessage: { domain: null, _events: [Object], _maxListeners: 10, output: [], outputEncodings: [], writable: true, _last: false, chunkedEncoding: false, shouldKeepAlive: true, useChunkedEncodingByDefault: true, sendDate: true, _headerSent: false, _header: '', _hasBody: true, _trailer: '', finished: false, _hangupClose: false, socket: [Circular], connection: [Circular] } }, connection: { _connecting: false, _handle: { fd: 69, writeQueueSize: 0, owner: [Circular], onread: [Function: onread], reading: true }, _readableState: { highWaterMark: 16384, buffer: [], length: 0, pipes: null, pipesCount: 0, flowing: false, ended: false, endEmitted: false, reading: true, calledRead: true, sync: false, needReadable: true, emittedReadable: false, readableListening: false, objectMode: false, defaultEncoding: 'utf8', ranOut: false, awaitDrain: 0, readingMore: false, decoder: null, encoding: null }, readable: true, domain: null, _events: { end: [Object], finish: [Function: onSocketFinish], _socketEnd: [Function: onSocketEnd], drain: [Object], timeout: [Function], error: [Function], close: [Object] }, _maxListeners: 10, _writableState: { highWaterMark: 16384, objectMode: false, needDrain: false, ending: false, ended: false, finished: false, decodeStrings: false, defaultEncoding: 'utf8', length: 0, writing: false, sync: false, bufferProcessing: false, onwrite: [Function], writecb: null, writelen: 0, buffer: [], errorEmitted: false }, writable: true, allowHalfOpen: true, onend: [Function], destroyed: false, bytesRead: 1422, _bytesDispatched: 436, _pendingData: null, _pendingEncoding: '', server: { domain: null, _events: [Object], _maxListeners: 10, _connections: 4, connections: [Getter/Setter], _handle: [Object], _usingSlaves: false, _slaves: [], allowHalfOpen: true, httpAllowHalfOpen: false, timeout: 120000, _connectionKey: '4:0.0.0.0:8080' }, _idleTimeout: 120000, _idleNext: { _connecting: false, _handle: [Object], _readableState: [Object], readable: true, domain: null, _events: [Object], _maxListeners: 10, _writableState: [Object], writable: true, allowHalfOpen: true, onend: [Function], destroyed: false, bytesRead: 1027, _bytesDispatched: 435, _pendingData: null, _pendingEncoding: '', server: [Object], _idleTimeout: 120000, _idleNext: [Object], _idlePrev: [Circular], _idleStart: 1417543369036, _monotonicStartTime: 17484194, parser: [Object], ondata: [Function], _paused: false, _httpMessage: null }, _idlePrev: { _idleNext: [Circular], _idlePrev: [Object] }, _idleStart: 1417543369124, _monotonicStartTime: 17484281, parser: { _headers: [], _url: '', onHeaders: [Function: parserOnHeaders], onHeadersComplete: [Function: parserOnHeadersComplete], onBody: [Function: parserOnBody], onMessageComplete: [Function: parserOnMessageComplete], socket: [Circular], incoming: [Circular], maxHeaderPairs: 2000, onIncoming: [Function] }, ondata: [Function], _paused: false, _httpMessage: { domain: null, _events: [Object], _maxListeners: 10, output: [], outputEncodings: [], writable: true, _last: false, chunkedEncoding: false, shouldKeepAlive: true, useChunkedEncodingByDefault: true, sendDate: true, _headerSent: false, _header: '', _hasBody: true, _trailer: '', finished: false, _hangupClose: false, socket: [Circular], connection: [Circular] } }, httpVersion: '1.1', complete: false, headers: { host: 'localhost:8080', connection: 'keep-alive', accept: 'application/json, text/plain, */*', 'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.111 Safari/537.36', dnt: '1', referer: 'http://localhost:8080/admin/posts/', 'accept-encoding': 'gzip,deflate,sdch', 'accept-language': 'en-US,en;q=0.8', cookie: 'token=testing123abc' }, trailers: {}, _pendings: [], _pendingIndex: 0, url: '/api/posts', method: 'GET', statusCode: null, client: { _connecting: false, _handle: { fd: 69, writeQueueSize: 0, owner: [Circular], onread: [Function: onread], reading: true }, _readableState: { highWaterMark: 16384, buffer: [], length: 0, pipes: null, pipesCount: 0, flowing: false, ended: false, endEmitted: false, reading: true, calledRead: true, sync: false, needReadable: true, emittedReadable: false, readableListening: false, objectMode: false, defaultEncoding: 'utf8', ranOut: false, awaitDrain: 0, readingMore: false, decoder: null, encoding: null }, readable: true, domain: null, _events: { end: [Object], finish: [Function: onSocketFinish], _socketEnd: [Function: onSocketEnd], drain: [Object], timeout: [Function], error: [Function], close: [Object] }, _maxListeners: 10, _writableState: { highWaterMark: 16384, objectMode: false, needDrain: false, ending: false, ended: false, finished: false, decodeStrings: false, defaultEncoding: 'utf8', length: 0, writing: false, sync: false, bufferProcessing: false, onwrite: [Function], writecb: null, writelen: 0, buffer: [], errorEmitted: false }, writable: true, allowHalfOpen: true, onend: [Function], destroyed: false, bytesRead: 1422, _bytesDispatched: 436, _pendingData: null, _pendingEncoding: '', server: { domain: null, _events: [Object], _maxListeners: 10, _connections: 4, connections: [Getter/Setter], _handle: [Object], _usingSlaves: false, _slaves: [], allowHalfOpen: true, httpAllowHalfOpen: false, timeout: 120000, _connectionKey: '4:0.0.0.0:8080' }, _idleTimeout: 120000, _idleNext: { _connecting: false, _handle: [Object], _readableState: [Object], readable: true, domain: null, _events: [Object], _maxListeners: 10, _writableState: [Object], writable: true, allowHalfOpen: true, onend: [Function], destroyed: false, bytesRead: 1027, _bytesDispatched: 435, _pendingData: null, _pendingEncoding: '', server: [Object], _idleTimeout: 120000, _idleNext: [Object], _idlePrev: [Circular], _idleStart: 1417543369036, _monotonicStartTime: 17484194, parser: [Object], ondata: [Function], _paused: false, _httpMessage: null }, _idlePrev: { _idleNext: [Circular], _idlePrev: [Object] }, _idleStart: 1417543369124, _monotonicStartTime: 17484281, parser: { _headers: [], _url: '', onHeaders: [Function: parserOnHeaders], onHeadersComplete: [Function: parserOnHeadersComplete], onBody: [Function: parserOnBody], onMessageComplete: [Function: parserOnMessageComplete], socket: [Circular], incoming: [Circular], maxHeaderPairs: 2000, onIncoming: [Function] }, ondata: [Function], _paused: false, _httpMessage: { domain: null, _events: [Object], _maxListeners: 10, output: [], outputEncodings: [], writable: true, _last: false, chunkedEncoding: false, shouldKeepAlive: true, useChunkedEncodingByDefault: true, sendDate: true, _headerSent: false, _header: '', _hasBody: true, _trailer: '', finished: false, _hangupClose: false, socket: [Circular], connection: [Circular] } }, _consuming: false, _dumped: false, httpVersionMajor: 1, httpVersionMinor: 1, upgrade: false } Example instance of http.ServerResponse: { domain: null, _events: { finish: [Function] }, _maxListeners: 10, output: [], outputEncodings: [], writable: true, _last: false, chunkedEncoding: false, shouldKeepAlive: true, useChunkedEncodingByDefault: true, sendDate: true, _headerSent: false, _header: '', _hasBody: true, _trailer: '', finished: false, _hangupClose: false, socket: { _connecting: false, _handle: { fd: 69, writeQueueSize: 0, owner: [Circular], onread: [Function: onread], reading: true }, _readableState: { highWaterMark: 16384, buffer: [], length: 0, pipes: null, pipesCount: 0, flowing: false, ended: false, endEmitted: false, reading: true, calledRead: true, sync: false, needReadable: true, emittedReadable: false, readableListening: false, objectMode: false, defaultEncoding: 'utf8', ranOut: false, awaitDrain: 0, readingMore: false, decoder: null, encoding: null }, readable: true, domain: null, _events: { end: [Object], finish: [Function: onSocketFinish], _socketEnd: [Function: onSocketEnd], drain: [Object], timeout: [Function], error: [Function], close: [Object] }, _maxListeners: 10, _writableState: { highWaterMark: 16384, objectMode: false, needDrain: false, ending: false, ended: false, finished: false, decodeStrings: false, defaultEncoding: 'utf8', length: 0, writing: false, sync: false, bufferProcessing: false, onwrite: [Function], writecb: null, writelen: 0, buffer: [], errorEmitted: false }, writable: true, allowHalfOpen: true, onend: [Function], destroyed: false, bytesRead: 1861, _bytesDispatched: 653, _pendingData: null, _pendingEncoding: '', server: { domain: null, _events: [Object], _maxListeners: 10, _connections: 3, connections: [Getter/Setter], _handle: [Object], _usingSlaves: false, _slaves: [], allowHalfOpen: true, httpAllowHalfOpen: false, timeout: 120000, _connectionKey: '4:0.0.0.0:8080' }, _idleTimeout: 120000, _idleNext: { _connecting: false, _handle: [Object], _readableState: [Object], readable: true, domain: null, _events: [Object], _maxListeners: 10, _writableState: [Object], writable: true, allowHalfOpen: true, onend: [Function], destroyed: false, bytesRead: 2462, _bytesDispatched: 872, _pendingData: null, _pendingEncoding: '', server: [Object], _idleTimeout: 120000, _idleNext: [Object], _idlePrev: [Circular], _idleStart: 1417543685762, _monotonicStartTime: 17800925, parser: [Object], ondata: [Function], _paused: false, _httpMessage: [Object] }, _idlePrev: { _idleNext: [Circular], _idlePrev: [Object] }, _idleStart: 1417543685788, _monotonicStartTime: 17800951, parser: { _headers: [], _url: '', onHeaders: [Function: parserOnHeaders], onHeadersComplete: [Function: parserOnHeadersComplete], onBody: [Function: parserOnBody], onMessageComplete: [Function: parserOnMessageComplete], socket: [Circular], incoming: [Object], maxHeaderPairs: 2000, onIncoming: [Function] }, ondata: [Function], _paused: false, _httpMessage: [Circular] }, connection: { _connecting: false, _handle: { fd: 69, writeQueueSize: 0, owner: [Circular], onread: [Function: onread], reading: true }, _readableState: { highWaterMark: 16384, buffer: [], length: 0, pipes: null, pipesCount: 0, flowing: false, ended: false, endEmitted: false, reading: true, calledRead: true, sync: false, needReadable: true, emittedReadable: false, readableListening: false, objectMode: false, defaultEncoding: 'utf8', ranOut: false, awaitDrain: 0, readingMore: false, decoder: null, encoding: null }, readable: true, domain: null, _events: { end: [Object], finish: [Function: onSocketFinish], _socketEnd: [Function: onSocketEnd], drain: [Object], timeout: [Function], error: [Function], close: [Object] }, _maxListeners: 10, _writableState: { highWaterMark: 16384, objectMode: false, needDrain: false, ending: false, ended: false, finished: false, decodeStrings: false, defaultEncoding: 'utf8', length: 0, writing: false, sync: false, bufferProcessing: false, onwrite: [Function], writecb: null, writelen: 0, buffer: [], errorEmitted: false }, writable: true, allowHalfOpen: true, onend: [Function], destroyed: false, bytesRead: 1861, _bytesDispatched: 653, _pendingData: null, _pendingEncoding: '', server: { domain: null, _events: [Object], _maxListeners: 10, _connections: 3, connections: [Getter/Setter], _handle: [Object], _usingSlaves: false, _slaves: [], allowHalfOpen: true, httpAllowHalfOpen: false, timeout: 120000, _connectionKey: '4:0.0.0.0:8080' }, _idleTimeout: 120000, _idleNext: { _connecting: false, _handle: [Object], _readableState: [Object], readable: true, domain: null, _events: [Object], _maxListeners: 10, _writableState: [Object], writable: true, allowHalfOpen: true, onend: [Function], destroyed: false, bytesRead: 2462, _bytesDispatched: 872, _pendingData: null, _pendingEncoding: '', server: [Object], _idleTimeout: 120000, _idleNext: [Object], _idlePrev: [Circular], _idleStart: 1417543685762, _monotonicStartTime: 17800925, parser: [Object], ondata: [Function], _paused: false, _httpMessage: [Object] }, _idlePrev: { _idleNext: [Circular], _idlePrev: [Object] }, _idleStart: 1417543685788, _monotonicStartTime: 17800951, parser: { _headers: [], _url: '', onHeaders: [Function: parserOnHeaders], onHeadersComplete: [Function: parserOnHeadersComplete], onBody: [Function: parserOnBody], onMessageComplete: [Function: parserOnMessageComplete], socket: [Circular], incoming: [Object], maxHeaderPairs: 2000, onIncoming: [Function] }, ondata: [Function], _paused: false, _httpMessage: [Circular] } }