Created
July 23, 2013 10:27
-
-
Save ktkaushik/6061413 to your computer and use it in GitHub Desktop.
request object in sailsjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { domain: null, | |
| _events: { data: [Function], end: [Function] }, | |
| _maxListeners: 10, | |
| socket: | |
| { domain: null, | |
| _events: | |
| { drain: [Function: ondrain], | |
| timeout: [Object], | |
| error: [Function], | |
| close: [Object] }, | |
| _maxListeners: 10, | |
| _handle: | |
| { writeQueueSize: 0, | |
| owner: [Circular], | |
| onread: [Function: onread] }, | |
| _pendingWriteReqs: 0, | |
| _flags: 0, | |
| _connectQueueSize: 0, | |
| destroyed: false, | |
| errorEmitted: false, | |
| bytesRead: 936, | |
| _bytesDispatched: 0, | |
| allowHalfOpen: true, | |
| writable: true, | |
| readable: true, | |
| server: | |
| { domain: null, | |
| _events: [Object], | |
| _maxListeners: 10, | |
| _connections: 1, | |
| connections: [Getter/Setter], | |
| allowHalfOpen: true, | |
| _handle: [Object], | |
| httpAllowHalfOpen: false, | |
| _connectionKey: '4:0.0.0.0:1337' }, | |
| _idleTimeout: 120000, | |
| _idleNext: | |
| { _idleNext: [Circular], | |
| _idlePrev: [Circular], | |
| ontimeout: [Function] }, | |
| _idlePrev: | |
| { _idleNext: [Circular], | |
| _idlePrev: [Circular], | |
| ontimeout: [Function] }, | |
| _idleStart: Tue Jul 23 2013 15:55:03 GMT+0530 (IST), | |
| 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], | |
| onend: [Function], | |
| _httpMessage: | |
| { domain: null, | |
| _events: [Object], | |
| _maxListeners: 10, | |
| output: [], | |
| outputEncodings: [], | |
| writable: true, | |
| _last: false, | |
| chunkedEncoding: false, | |
| shouldKeepAlive: true, | |
| useChunkedEncodingByDefault: true, | |
| sendDate: true, | |
| _hasBody: true, | |
| _trailer: '', | |
| finished: false, | |
| _hangupClose: false, | |
| socket: [Circular], | |
| connection: [Circular], | |
| app: [Object], | |
| _headers: [Object], | |
| _headerNames: [Object], | |
| req: [Circular], | |
| locals: [Object], | |
| end: [Function], | |
| error: [Function: respondWithError], | |
| view: [Function], | |
| i18n: [Function] }, | |
| _paused: false }, | |
| connection: | |
| { domain: null, | |
| _events: | |
| { drain: [Function: ondrain], | |
| timeout: [Object], | |
| error: [Function], | |
| close: [Object] }, | |
| _maxListeners: 10, | |
| _handle: | |
| { writeQueueSize: 0, | |
| owner: [Circular], | |
| onread: [Function: onread] }, | |
| _pendingWriteReqs: 0, | |
| _flags: 0, | |
| _connectQueueSize: 0, | |
| destroyed: false, | |
| errorEmitted: false, | |
| bytesRead: 936, | |
| _bytesDispatched: 0, | |
| allowHalfOpen: true, | |
| writable: true, | |
| readable: true, | |
| server: | |
| { domain: null, | |
| _events: [Object], | |
| _maxListeners: 10, | |
| _connections: 1, | |
| connections: [Getter/Setter], | |
| allowHalfOpen: true, | |
| _handle: [Object], | |
| httpAllowHalfOpen: false, | |
| _connectionKey: '4:0.0.0.0:1337' }, | |
| _idleTimeout: 120000, | |
| _idleNext: | |
| { _idleNext: [Circular], | |
| _idlePrev: [Circular], | |
| ontimeout: [Function] }, | |
| _idlePrev: | |
| { _idleNext: [Circular], | |
| _idlePrev: [Circular], | |
| ontimeout: [Function] }, | |
| _idleStart: Tue Jul 23 2013 15:55:03 GMT+0530 (IST), | |
| 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], | |
| onend: [Function], | |
| _httpMessage: | |
| { domain: null, | |
| _events: [Object], | |
| _maxListeners: 10, | |
| output: [], | |
| outputEncodings: [], | |
| writable: true, | |
| _last: false, | |
| chunkedEncoding: false, | |
| shouldKeepAlive: true, | |
| useChunkedEncodingByDefault: true, | |
| sendDate: true, | |
| _hasBody: true, | |
| _trailer: '', | |
| finished: false, | |
| _hangupClose: false, | |
| socket: [Circular], | |
| connection: [Circular], | |
| app: [Object], | |
| _headers: [Object], | |
| _headerNames: [Object], | |
| req: [Circular], | |
| locals: [Object], | |
| end: [Function], | |
| error: [Function: respondWithError], | |
| view: [Function], | |
| i18n: [Function] }, | |
| _paused: false }, | |
| httpVersion: '1.1', | |
| complete: true, | |
| headers: | |
| { host: 'localhost:1337', | |
| connection: 'keep-alive', | |
| 'cache-control': 'max-age=0', | |
| accept: 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', | |
| 'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.71 Safari/537.36', | |
| 'accept-encoding': 'gzip,deflate,sdch', | |
| 'accept-language': 'en-US,en;q=0.8', | |
| cookie: '_road_session=BAh7CEkiD3Nlc3Npb25faWQGOgZFVEkiJTc1NjUxODg5Y2ZkZjkwZjNhZmVhZDcwZmI2MmJkNzU3BjsAVEkiEF9jc3JmX3Rva2VuBjsARkkiMVhxMDVCYWJ2S1FqMnFGckoyNWhXTFg3dE1BbVdJcGRCL3BQRXlVRmo2MDg9BjsARkkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBmkGSSIiJDJhJDEwJEdETWhzbmxxOTNENE5JeENFZGZuSWUGOwBU--f50816978f24c59ae2d23ea2b4ab00e86defcc4b; connect.sid=s%3A8gO-eVW-9_0Tqe9HtULN_jkZ.JSTW81yLJytEiAcBS49X85jx6bZq%2FmsbNbuZBgE0lNM; sails.sid=s%3AnDtmMmHDuSW1JwBxV79nBpRT.jv7dOId6PrmFmXAkuzcqPIMuz5T2SeJrEmxUR2CqsEE', | |
| 'if-none-match': '"-1605872349"', | |
| 'content-type': undefined }, | |
| trailers: {}, | |
| readable: false, | |
| _paused: false, | |
| _pendings: [], | |
| _endEmitted: true, | |
| url: '/posts/create?name=sails', | |
| method: 'GET', | |
| statusCode: null, | |
| client: | |
| { domain: null, | |
| _events: | |
| { drain: [Function: ondrain], | |
| timeout: [Object], | |
| error: [Function], | |
| close: [Object] }, | |
| _maxListeners: 10, | |
| _handle: | |
| { writeQueueSize: 0, | |
| owner: [Circular], | |
| onread: [Function: onread] }, | |
| _pendingWriteReqs: 0, | |
| _flags: 0, | |
| _connectQueueSize: 0, | |
| destroyed: false, | |
| errorEmitted: false, | |
| bytesRead: 936, | |
| _bytesDispatched: 0, | |
| allowHalfOpen: true, | |
| writable: true, | |
| readable: true, | |
| server: | |
| { domain: null, | |
| _events: [Object], | |
| _maxListeners: 10, | |
| _connections: 1, | |
| connections: [Getter/Setter], | |
| allowHalfOpen: true, | |
| _handle: [Object], | |
| httpAllowHalfOpen: false, | |
| _connectionKey: '4:0.0.0.0:1337' }, | |
| _idleTimeout: 120000, | |
| _idleNext: | |
| { _idleNext: [Circular], | |
| _idlePrev: [Circular], | |
| ontimeout: [Function] }, | |
| _idlePrev: | |
| { _idleNext: [Circular], | |
| _idlePrev: [Circular], | |
| ontimeout: [Function] }, | |
| _idleStart: Tue Jul 23 2013 15:55:03 GMT+0530 (IST), | |
| 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], | |
| onend: [Function], | |
| _httpMessage: | |
| { domain: null, | |
| _events: [Object], | |
| _maxListeners: 10, | |
| output: [], | |
| outputEncodings: [], | |
| writable: true, | |
| _last: false, | |
| chunkedEncoding: false, | |
| shouldKeepAlive: true, | |
| useChunkedEncodingByDefault: true, | |
| sendDate: true, | |
| _hasBody: true, | |
| _trailer: '', | |
| finished: false, | |
| _hangupClose: false, | |
| socket: [Circular], | |
| connection: [Circular], | |
| app: [Object], | |
| _headers: [Object], | |
| _headerNames: [Object], | |
| req: [Circular], | |
| locals: [Object], | |
| end: [Function], | |
| error: [Function: respondWithError], | |
| view: [Function], | |
| i18n: [Function] }, | |
| _paused: false }, | |
| httpVersionMajor: 1, | |
| httpVersionMinor: 1, | |
| upgrade: false, | |
| originalUrl: '/posts/create?name=sails', | |
| _parsedUrl: | |
| { search: '?name=sails', | |
| query: 'name=sails', | |
| pathname: '/posts/create', | |
| path: '/posts/create?name=sails', | |
| href: '/posts/create?name=sails' }, | |
| query: { name: 'sails' }, | |
| app: | |
| { [Function: app] | |
| use: [Function], | |
| handle: [Function], | |
| listen: [Function], | |
| setMaxListeners: [Function], | |
| emit: [Function], | |
| addListener: [Function], | |
| on: [Function], | |
| once: [Function], | |
| removeListener: [Function], | |
| removeAllListeners: [Function], | |
| listeners: [Function], | |
| route: '/', | |
| stack: | |
| [ [Object], | |
| [Object], | |
| [Object], | |
| [Object], | |
| [Object], | |
| [Object], | |
| [Object], | |
| [Object], | |
| [Object], | |
| [Object], | |
| [Object], | |
| [Object], | |
| [Object], | |
| [Object] ], | |
| init: [Function], | |
| defaultConfiguration: [Function], | |
| engine: [Function], | |
| param: [Function], | |
| set: [Function], | |
| path: [Function], | |
| enabled: [Function], | |
| disabled: [Function], | |
| enable: [Function], | |
| disable: [Function], | |
| configure: [Function], | |
| get: [Function], | |
| post: [Function], | |
| put: [Function], | |
| head: [Function], | |
| delete: [Function], | |
| options: [Function], | |
| trace: [Function], | |
| copy: [Function], | |
| lock: [Function], | |
| mkcol: [Function], | |
| move: [Function], | |
| propfind: [Function], | |
| proppatch: [Function], | |
| unlock: [Function], | |
| report: [Function], | |
| mkactivity: [Function], | |
| checkout: [Function], | |
| merge: [Function], | |
| 'm-search': [Function], | |
| notify: [Function], | |
| subscribe: [Function], | |
| unsubscribe: [Function], | |
| patch: [Function], | |
| all: [Function], | |
| del: [Function], | |
| render: [Function], | |
| request: {}, | |
| response: {}, | |
| cache: {}, | |
| settings: | |
| { 'x-powered-by': true, | |
| env: 'development', | |
| 'subdomain offset': 2, | |
| view: [Function: View], | |
| views: '/Users/kaushik/dev/office/latestSails/views', | |
| 'jsonp callback name': 'callback', | |
| 'json spaces': 2, | |
| 'view engine': 'ejs' }, | |
| engines: { '.ejs': [Function] }, | |
| _events: { mount: [Function] }, | |
| _router: | |
| { map: [Object], | |
| params: {}, | |
| _params: [], | |
| caseSensitive: false, | |
| strict: false, | |
| middleware: [Function: router] }, | |
| routes: | |
| { get: [Object], | |
| post: [Object], | |
| put: [Object], | |
| head: [Object], | |
| delete: [Object], | |
| options: [Object], | |
| trace: [Object], | |
| copy: [Object], | |
| lock: [Object], | |
| mkcol: [Object], | |
| move: [Object], | |
| propfind: [Object], | |
| proppatch: [Object], | |
| unlock: [Object], | |
| report: [Object], | |
| mkactivity: [Object], | |
| checkout: [Object], | |
| merge: [Object], | |
| 'm-search': [Object], | |
| notify: [Object], | |
| subscribe: [Object], | |
| unsubscribe: [Object], | |
| patch: [Object] }, | |
| router: [Getter], | |
| locals: { [Function: locals] settings: [Object] }, | |
| _usedRouter: true }, | |
| res: | |
| { domain: null, | |
| _events: { finish: [Function], header: [Function] }, | |
| _maxListeners: 10, | |
| output: [], | |
| outputEncodings: [], | |
| writable: true, | |
| _last: false, | |
| chunkedEncoding: false, | |
| shouldKeepAlive: true, | |
| useChunkedEncodingByDefault: true, | |
| sendDate: true, | |
| _hasBody: true, | |
| _trailer: '', | |
| finished: false, | |
| _hangupClose: false, | |
| socket: | |
| { domain: null, | |
| _events: [Object], | |
| _maxListeners: 10, | |
| _handle: [Object], | |
| _pendingWriteReqs: 0, | |
| _flags: 0, | |
| _connectQueueSize: 0, | |
| destroyed: false, | |
| errorEmitted: false, | |
| bytesRead: 936, | |
| _bytesDispatched: 0, | |
| allowHalfOpen: true, | |
| writable: true, | |
| readable: true, | |
| server: [Object], | |
| _idleTimeout: 120000, | |
| _idleNext: [Object], | |
| _idlePrev: [Object], | |
| _idleStart: Tue Jul 23 2013 15:55:03 GMT+0530 (IST), | |
| parser: [Object], | |
| ondata: [Function], | |
| onend: [Function], | |
| _httpMessage: [Circular], | |
| _paused: false }, | |
| connection: | |
| { domain: null, | |
| _events: [Object], | |
| _maxListeners: 10, | |
| _handle: [Object], | |
| _pendingWriteReqs: 0, | |
| _flags: 0, | |
| _connectQueueSize: 0, | |
| destroyed: false, | |
| errorEmitted: false, | |
| bytesRead: 936, | |
| _bytesDispatched: 0, | |
| allowHalfOpen: true, | |
| writable: true, | |
| readable: true, | |
| server: [Object], | |
| _idleTimeout: 120000, | |
| _idleNext: [Object], | |
| _idlePrev: [Object], | |
| _idleStart: Tue Jul 23 2013 15:55:03 GMT+0530 (IST), | |
| parser: [Object], | |
| ondata: [Function], | |
| onend: [Function], | |
| _httpMessage: [Circular], | |
| _paused: false }, | |
| app: | |
| { [Function: app] | |
| use: [Function], | |
| handle: [Function], | |
| listen: [Function], | |
| setMaxListeners: [Function], | |
| emit: [Function], | |
| addListener: [Function], | |
| on: [Function], | |
| once: [Function], | |
| removeListener: [Function], | |
| removeAllListeners: [Function], | |
| listeners: [Function], | |
| route: '/', | |
| stack: [Object], | |
| init: [Function], | |
| defaultConfiguration: [Function], | |
| engine: [Function], | |
| param: [Function], | |
| set: [Function], | |
| path: [Function], | |
| enabled: [Function], | |
| disabled: [Function], | |
| enable: [Function], | |
| disable: [Function], | |
| configure: [Function], | |
| get: [Function], | |
| post: [Function], | |
| put: [Function], | |
| head: [Function], | |
| delete: [Function], | |
| options: [Function], | |
| trace: [Function], | |
| copy: [Function], | |
| lock: [Function], | |
| mkcol: [Function], | |
| move: [Function], | |
| propfind: [Function], | |
| proppatch: [Function], | |
| unlock: [Function], | |
| report: [Function], | |
| mkactivity: [Function], | |
| checkout: [Function], | |
| merge: [Function], | |
| 'm-search': [Function], | |
| notify: [Function], | |
| subscribe: [Function], | |
| unsubscribe: [Function], | |
| patch: [Function], | |
| all: [Function], | |
| del: [Function], | |
| render: [Function], | |
| request: {}, | |
| response: {}, | |
| cache: {}, | |
| settings: [Object], | |
| engines: [Object], | |
| _events: [Object], | |
| _router: [Object], | |
| routes: [Object], | |
| router: [Getter], | |
| locals: [Object], | |
| _usedRouter: true }, | |
| _headers: { 'x-powered-by': 'Sails <sailsjs.org>' }, | |
| _headerNames: { 'x-powered-by': 'X-Powered-By' }, | |
| req: [Circular], | |
| locals: | |
| { [Function: locals] | |
| _: [Object], | |
| util: [Object], | |
| session: [Object], | |
| title: 'Sails', | |
| req: [Circular], | |
| res: [Circular], | |
| sails: [Object], | |
| _csrf: null, | |
| i18n: [Function] }, | |
| end: [Function], | |
| error: [Function: respondWithError], | |
| view: [Function], | |
| i18n: [Function] }, | |
| next: [Function: next], | |
| secret: '8fdbedaa7b7415e5d42ca70bcc55ad2e', | |
| cookies: | |
| { _road_session: 'BAh7CEkiD3Nlc3Npb25faWQGOgZFVEkiJTc1NjUxODg5Y2ZkZjkwZjNhZmVhZDcwZmI2MmJkNzU3BjsAVEkiEF9jc3JmX3Rva2VuBjsARkkiMVhxMDVCYWJ2S1FqMnFGckoyNWhXTFg3dE1BbVdJcGRCL3BQRXlVRmo2MDg9BjsARkkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBmkGSSIiJDJhJDEwJEdETWhzbmxxOTNENE5JeENFZGZuSWUGOwBU--f50816978f24c59ae2d23ea2b4ab00e86defcc4b', | |
| 'connect.sid': 's:8gO-eVW-9_0Tqe9HtULN_jkZ.JSTW81yLJytEiAcBS49X85jx6bZq/msbNbuZBgE0lNM' }, | |
| signedCookies: { 'sails.sid': 'nDtmMmHDuSW1JwBxV79nBpRT' }, | |
| sessionStore: | |
| { sessions: {}, | |
| generate: [Function], | |
| _events: { disconnect: [Function], connect: [Function] } }, | |
| sessionID: 'tRKPIueQNXXVOPuxW7i9WVMV', | |
| session: | |
| { cookie: | |
| { path: '/', | |
| _expires: null, | |
| originalMaxAge: null, | |
| httpOnly: true } }, | |
| body: {}, | |
| files: {}, | |
| originalMethod: 'GET', | |
| _route_index: 11, | |
| route: | |
| { path: '/posts/create/:id?', | |
| method: 'get', | |
| callbacks: [ [Function] ], | |
| keys: [ [Object] ], | |
| regexp: /^\/posts\/create(?:\/([^\/]+?))?\/?$/i, | |
| params: [] }, | |
| params: [], | |
| port: undefined, | |
| baseUrl: 'http://localhost:undefined', | |
| rawHost: 'localhost', | |
| rootUrl: 'http://localhost:undefined', | |
| baseurl: 'http://localhost:undefined', | |
| explicitlyAcceptsHTML: true, | |
| wantsJSON: false, | |
| isAjax: false, | |
| isJson: false, | |
| acceptJson: false, | |
| isJsony: false, | |
| languages: [ 'en', 'en' ], | |
| regions: [ 'us' ], | |
| language: 'en', | |
| region: 'us', | |
| locale: 'en', | |
| target: { controller: 'posts', action: 'create' } } | |
| {} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
good job!