Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ node getToken.js
- resp: IncomingMessage {
- _readableState:
- ReadableState {
- objectMode: false,
- highWaterMark: 16384,
- buffer: [],
- length: 0,
- pipes: null,
- pipesCount: 0,
- flowing: true,
- ended: true,
- endEmitted: true,
- reading: false,
- sync: true,
- needReadable: false,
- emittedReadable: false,
- readableListening: false,
- resumeScheduled: false,
- defaultEncoding: 'utf8',
- ranOut: false,
- awaitDrain: 0,
- readingMore: false,
- decoder: null,
- encoding: null },
- readable: false,
- domain: null,
- _events:
- { end: [ [Function: responseOnEnd], [Function], [Function], [Function] ],
- close: [ [Function], [Function] ],
- data: [Function],
- error: [Function] },
- _eventsCount: 4,
- _maxListeners: undefined,
- socket:
- TLSSocket {
- _tlsOptions:
- { pipe: null,
- secureContext: [Object],
- isServer: false,
- requestCert: true,
- rejectUnauthorized: true,
- session: undefined,
- NPNProtocols: undefined,
- ALPNProtocols: undefined,
- requestOCSP: undefined },
- _secureEstablished: true,
- _securePending: false,
- _newSessionPending: false,
- _controlReleased: true,
- _SNICallback: null,
- servername: null,
- npnProtocol: false,
- alpnProtocol: false,
- authorized: true,
- authorizationError: null,
- encrypted: true,
- _events:
- { close: [Object],
- end: [Object],
- finish: [Function: onSocketFinish],
- _socketEnd: [Function: onSocketEnd],
- secure: [Function],
- free: [Function: onFree],
- agentRemove: [Function: onRemove],
- drain: [Function: ondrain],
- error: [Object] },
- _eventsCount: 9,
- _connecting: false,
- _hadError: false,
- _handle: null,
- _parent: null,
- _host: 'api.dropboxapi.com',
- _readableState:
- ReadableState {
- objectMode: false,
- highWaterMark: 16384,
- buffer: [],
- length: 0,
- pipes: null,
- pipesCount: 0,
- flowing: true,
- ended: false,
- endEmitted: false,
- reading: true,
- sync: false,
- needReadable: true,
- emittedReadable: false,
- readableListening: false,
- resumeScheduled: false,
- defaultEncoding: 'utf8',
- ranOut: false,
- awaitDrain: 0,
- readingMore: false,
- decoder: null,
- encoding: null },
- readable: false,
- domain: null,
- _maxListeners: 0,
- _writableState:
- WritableState {
- objectMode: false,
- highWaterMark: 16384,
- needDrain: false,
- ending: true,
- ended: true,
- finished: true,
- decodeStrings: false,
- defaultEncoding: 'utf8',
- length: 0,
- writing: false,
- corked: 0,
- sync: false,
- bufferProcessing: false,
- onwrite: [Function],
- writecb: null,
- writelen: 0,
- bufferedRequest: null,
- lastBufferedRequest: null,
- pendingcb: 0,
- prefinished: true,
- errorEmitted: false },
- writable: false,
- allowHalfOpen: false,
- destroyed: true,
- bytesRead: 316,
- _bytesDispatched: 311,
- _sockname: null,
- _pendingData: null,
- _pendingEncoding: '',
- ssl:
- TLSWrap {
- _externalStream: {},
- fd: -22,
- _parent: [Object],
- _parentWrap: undefined,
- _secureContext: [Object],
- reading: true,
- owner: [Circular],
- onread: [Function: noop],
- writeQueueSize: 1,
- onhandshakestart: [Function],
- onhandshakedone: [Function],
- onocspresponse: [Function],
- onerror: [Function] },
- server: undefined,
- _requestCert: true,
- _rejectUnauthorized: true,
- parser: null,
- _httpMessage:
- ClientRequest {
- domain: null,
- _events: [Object],
- _eventsCount: 4,
- _maxListeners: undefined,
- output: [],
- outputEncodings: [],
- outputCallbacks: [],
- outputSize: 0,
- writable: true,
- _last: true,
- chunkedEncoding: false,
- shouldKeepAlive: false,
- useChunkedEncodingByDefault: true,
- sendDate: false,
- _removedHeader: [Object],
- _contentLength: null,
- _hasBody: true,
- _trailer: '',
- finished: true,
- _headerSent: true,
- socket: [Circular],
- connection: [Circular],
- _header: 'POST /1/oauth2/token HTTP/1.1\r\nhost: api.dropboxapi.com\r\nauthorization: Basic M2dlcnl3cnFwa2sxajVqOmd3eDNpOWY1cW03aTg3cg==\r\naccept: application/json\r\ncontent-type: application/json\r\ncontent-length: 88\r\nConnection: close\r\n\r\n',
- _headers: [Object],
- _headerNames: [Object],
- _onPendingData: null,
- agent: [Object],
- socketPath: undefined,
- method: 'POST',
- path: '/1/oauth2/token',
- parser: null,
- res: [Circular] },
- read: [Function],
- _consuming: true,
- _idleNext: null,
- _idlePrev: null,
- _idleTimeout: -1 },
- connection:
- TLSSocket {
- _tlsOptions:
- { pipe: null,
- secureContext: [Object],
- isServer: false,
- requestCert: true,
- rejectUnauthorized: true,
- session: undefined,
- NPNProtocols: undefined,
- ALPNProtocols: undefined,
- requestOCSP: undefined },
- _secureEstablished: true,
- _securePending: false,
- _newSessionPending: false,
- _controlReleased: true,
- _SNICallback: null,
- servername: null,
- npnProtocol: false,
- alpnProtocol: false,
- authorized: true,
- authorizationError: null,
- encrypted: true,
- _events:
- { close: [Object],
- end: [Object],
- finish: [Function: onSocketFinish],
- _socketEnd: [Function: onSocketEnd],
- secure: [Function],
- free: [Function: onFree],
- agentRemove: [Function: onRemove],
- drain: [Function: ondrain],
- error: [Object] },
- _eventsCount: 9,
- _connecting: false,
- _hadError: false,
- _handle: null,
- _parent: null,
- _host: 'api.dropboxapi.com',
- _readableState:
- ReadableState {
- objectMode: false,
- highWaterMark: 16384,
- buffer: [],
- length: 0,
- pipes: null,
- pipesCount: 0,
- flowing: true,
- ended: false,
- endEmitted: false,
- reading: true,
- sync: false,
- needReadable: true,
- emittedReadable: false,
- readableListening: false,
- resumeScheduled: false,
- defaultEncoding: 'utf8',
- ranOut: false,
- awaitDrain: 0,
- readingMore: false,
- decoder: null,
- encoding: null },
- readable: false,
- domain: null,
- _maxListeners: 0,
- _writableState:
- WritableState {
- objectMode: false,
- highWaterMark: 16384,
- needDrain: false,
- ending: true,
- ended: true,
- finished: true,
- decodeStrings: false,
- defaultEncoding: 'utf8',
- length: 0,
- writing: false,
- corked: 0,
- sync: false,
- bufferProcessing: false,
- onwrite: [Function],
- writecb: null,
- writelen: 0,
- bufferedRequest: null,
- lastBufferedRequest: null,
- pendingcb: 0,
- prefinished: true,
- errorEmitted: false },
- writable: false,
- allowHalfOpen: false,
- destroyed: true,
- bytesRead: 316,
- _bytesDispatched: 311,
- _sockname: null,
- _pendingData: null,
- _pendingEncoding: '',
- ssl:
- TLSWrap {
- _externalStream: {},
- fd: -22,
- _parent: [Object],
- _parentWrap: undefined,
- _secureContext: [Object],
- reading: true,
- owner: [Circular],
- onread: [Function: noop],
- writeQueueSize: 1,
- onhandshakestart: [Function],
- onhandshakedone: [Function],
- onocspresponse: [Function],
- onerror: [Function] },
- server: undefined,
- _requestCert: true,
- _rejectUnauthorized: true,
- parser: null,
- _httpMessage:
- ClientRequest {
- domain: null,
- _events: [Object],
- _eventsCount: 4,
- _maxListeners: undefined,
- output: [],
- outputEncodings: [],
- outputCallbacks: [],
- outputSize: 0,
- writable: true,
- _last: true,
- chunkedEncoding: false,
- shouldKeepAlive: false,
- useChunkedEncodingByDefault: true,
- sendDate: false,
- _removedHeader: [Object],
- _contentLength: null,
- _hasBody: true,
- _trailer: '',
- finished: true,
- _headerSent: true,
- socket: [Circular],
- connection: [Circular],
- _header: 'POST /1/oauth2/token HTTP/1.1\r\nhost: api.dropboxapi.com\r\nauthorization: Basic M2dlcnl3cnFwa2sxajVqOmd3eDNpOWY1cW03aTg3cg==\r\naccept: application/json\r\ncontent-type: application/json\r\ncontent-length: 88\r\nConnection: close\r\n\r\n',
- _headers: [Object],
- _headerNames: [Object],
- _onPendingData: null,
- agent: [Object],
- socketPath: undefined,
- method: 'POST',
- path: '/1/oauth2/token',
- parser: null,
- res: [Circular] },
- read: [Function],
- _consuming: true,
- _idleNext: null,
- _idlePrev: null,
- _idleTimeout: -1 },
- httpVersionMajor: 1,
- httpVersionMinor: 1,
- httpVersion: '1.1',
- complete: true,
- headers:
- { server: 'nginx',
- date: 'Wed, 27 Jan 2016 13:36:12 GMT',
- 'content-type': 'application/json',
- 'transfer-encoding': 'chunked',
- connection: 'close',
- 'x-dropbox-request-id': '22195df930341e2858563d1c75a33fb4' },
- rawHeaders:
- [ 'Server',
- 'nginx',
- 'Date',
- 'Wed, 27 Jan 2016 13:36:12 GMT',
- 'Content-Type',
- 'application/json',
- 'Transfer-Encoding',
- 'chunked',
- 'Connection',
- 'close',
- 'X-Dropbox-Request-Id',
- '22195df930341e2858563d1c75a33fb4' ],
- trailers: {},
- rawTrailers: [],
- upgrade: false,
- url: '',
- method: null,
- statusCode: 400,
- statusMessage: 'Bad Request',
- client:
- TLSSocket {
- _tlsOptions:
- { pipe: null,
- secureContext: [Object],
- isServer: false,
- requestCert: true,
- rejectUnauthorized: true,
- session: undefined,
- NPNProtocols: undefined,
- ALPNProtocols: undefined,
- requestOCSP: undefined },
- _secureEstablished: true,
- _securePending: false,
- _newSessionPending: false,
- _controlReleased: true,
- _SNICallback: null,
- servername: null,
- npnProtocol: false,
- alpnProtocol: false,
- authorized: true,
- authorizationError: null,
- encrypted: true,
- _events:
- { close: [Object],
- end: [Object],
- finish: [Function: onSocketFinish],
- _socketEnd: [Function: onSocketEnd],
- secure: [Function],
- free: [Function: onFree],
- agentRemove: [Function: onRemove],
- drain: [Function: ondrain],
- error: [Object] },
- _eventsCount: 9,
- _connecting: false,
- _hadError: false,
- _handle: null,
- _parent: null,
- _host: 'api.dropboxapi.com',
- _readableState:
- ReadableState {
- objectMode: false,
- highWaterMark: 16384,
- buffer: [],
- length: 0,
- pipes: null,
- pipesCount: 0,
- flowing: true,
- ended: false,
- endEmitted: false,
- reading: true,
- sync: false,
- needReadable: true,
- emittedReadable: false,
- readableListening: false,
- resumeScheduled: false,
- defaultEncoding: 'utf8',
- ranOut: false,
- awaitDrain: 0,
- readingMore: false,
- decoder: null,
- encoding: null },
- readable: false,
- domain: null,
- _maxListeners: 0,
- _writableState:
- WritableState {
- objectMode: false,
- highWaterMark: 16384,
- needDrain: false,
- ending: true,
- ended: true,
- finished: true,
- decodeStrings: false,
- defaultEncoding: 'utf8',
- length: 0,
- writing: false,
- corked: 0,
- sync: false,
- bufferProcessing: false,
- onwrite: [Function],
- writecb: null,
- writelen: 0,
- bufferedRequest: null,
- lastBufferedRequest: null,
- pendingcb: 0,
- prefinished: true,
- errorEmitted: false },
- writable: false,
- allowHalfOpen: false,
- destroyed: true,
- bytesRead: 316,
- _bytesDispatched: 311,
- _sockname: null,
- _pendingData: null,
- _pendingEncoding: '',
- ssl:
- TLSWrap {
- _externalStream: {},
- fd: -22,
- _parent: [Object],
- _parentWrap: undefined,
- _secureContext: [Object],
- reading: true,
- owner: [Circular],
- onread: [Function: noop],
- writeQueueSize: 1,
- onhandshakestart: [Function],
- onhandshakedone: [Function],
- onocspresponse: [Function],
- onerror: [Function] },
- server: undefined,
- _requestCert: true,
- _rejectUnauthorized: true,
- parser: null,
- _httpMessage:
- ClientRequest {
- domain: null,
- _events: [Object],
- _eventsCount: 4,
- _maxListeners: undefined,
- output: [],
- outputEncodings: [],
- outputCallbacks: [],
- outputSize: 0,
- writable: true,
- _last: true,
- chunkedEncoding: false,
- shouldKeepAlive: false,
- useChunkedEncodingByDefault: true,
- sendDate: false,
- _removedHeader: [Object],
- _contentLength: null,
- _hasBody: true,
- _trailer: '',
- finished: true,
- _headerSent: true,
- socket: [Circular],
- connection: [Circular],
- _header: 'POST /1/oauth2/token HTTP/1.1\r\nhost: api.dropboxapi.com\r\nauthorization: Basic M2dlcnl3cnFwa2sxajVqOmd3eDNpOWY1cW03aTg3cg==\r\naccept: application/json\r\ncontent-type: application/json\r\ncontent-length: 88\r\nConnection: close\r\n\r\n',
- _headers: [Object],
- _headerNames: [Object],
- _onPendingData: null,
- agent: [Object],
- socketPath: undefined,
- method: 'POST',
- path: '/1/oauth2/token',
- parser: null,
- res: [Circular] },
- read: [Function],
- _consuming: true,
- _idleNext: null,
- _idlePrev: null,
- _idleTimeout: -1 },
- _consuming: true,
- _dumped: false,
- req:
- ClientRequest {
- domain: null,
- _events:
- { socket: [Object],
- response: [Function: bound ],
- error: [Function: bound ],
- drain: [Function] },
- _eventsCount: 4,
- _maxListeners: undefined,
- output: [],
- outputEncodings: [],
- outputCallbacks: [],
- outputSize: 0,
- writable: true,
- _last: true,
- chunkedEncoding: false,
- shouldKeepAlive: false,
- useChunkedEncodingByDefault: true,
- sendDate: false,
- _removedHeader: { 'content-length': false },
- _contentLength: null,
- _hasBody: true,
- _trailer: '',
- finished: true,
- _headerSent: true,
- socket:
- TLSSocket {
- _tlsOptions: [Object],
- _secureEstablished: true,
- _securePending: false,
- _newSessionPending: false,
- _controlReleased: true,
- _SNICallback: null,
- servername: null,
- npnProtocol: false,
- alpnProtocol: false,
- authorized: true,
- authorizationError: null,
- encrypted: true,
- _events: [Object],
- _eventsCount: 9,
- _connecting: false,
- _hadError: false,
- _handle: null,
- _parent: null,
- _host: 'api.dropboxapi.com',
- _readableState: [Object],
- readable: false,
- domain: null,
- _maxListeners: 0,
- _writableState: [Object],
- writable: false,
- allowHalfOpen: false,
- destroyed: true,
- bytesRead: 316,
- _bytesDispatched: 311,
- _sockname: null,
- _pendingData: null,
- _pendingEncoding: '',
- ssl: [Object],
- server: undefined,
- _requestCert: true,
- _rejectUnauthorized: true,
- parser: null,
- _httpMessage: [Circular],
- read: [Function],
- _consuming: true,
- _idleNext: null,
- _idlePrev: null,
- _idleTimeout: -1 },
- connection:
- TLSSocket {
- _tlsOptions: [Object],
- _secureEstablished: true,
- _securePending: false,
- _newSessionPending: false,
- _controlReleased: true,
- _SNICallback: null,
- servername: null,
- npnProtocol: false,
- alpnProtocol: false,
- authorized: true,
- authorizationError: null,
- encrypted: true,
- _events: [Object],
- _eventsCount: 9,
- _connecting: false,
- _hadError: false,
- _handle: null,
- _parent: null,
- _host: 'api.dropboxapi.com',
- _readableState: [Object],
- readable: false,
- domain: null,
- _maxListeners: 0,
- _writableState: [Object],
- writable: false,
- allowHalfOpen: false,
- destroyed: true,
- bytesRead: 316,
- _bytesDispatched: 311,
- _sockname: null,
- _pendingData: null,
- _pendingEncoding: '',
- ssl: [Object],
- server: undefined,
- _requestCert: true,
- _rejectUnauthorized: true,
- parser: null,
- _httpMessage: [Circular],
- read: [Function],
- _consuming: true,
- _idleNext: null,
- _idlePrev: null,
- _idleTimeout: -1 },
- _header: 'POST /1/oauth2/token HTTP/1.1\r\nhost: api.dropboxapi.com\r\nauthorization: Basic M2dlcnl3cnFwa2sxajVqOmd3eDNpOWY1cW03aTg3cg==\r\naccept: application/json\r\ncontent-type: application/json\r\ncontent-length: 88\r\nConnection: close\r\n\r\n',
- _headers:
- { host: 'api.dropboxapi.com',
- authorization: 'Basic M2dlcnl3cnFwa2sxajVqOmd3eDNpOWY1cW03aTg3cg==',
- accept: 'application/json',
- 'content-type': 'application/json',
- 'content-length': 88 },
- _headerNames:
- { host: 'host',
- authorization: 'authorization',
- accept: 'accept',
- 'content-type': 'content-type',
- 'content-length': 'content-length' },
- _onPendingData: null,
- agent:
- Agent {
- domain: null,
- _events: [Object],
- _eventsCount: 1,
- _maxListeners: undefined,
- defaultPort: 443,
- protocol: 'https:',
- options: [Object],
- requests: {},
- sockets: [Object],
- freeSockets: {},
- keepAliveMsecs: 1000,
- keepAlive: false,
- maxSockets: Infinity,
- maxFreeSockets: 256,
- maxCachedSessions: 100,
- _sessionCache: [Object] },
- socketPath: undefined,
- method: 'POST',
- path: '/1/oauth2/token',
- parser: null,
- res: [Circular] },
- request:
- Request {
- domain: null,
- _events:
- { error: [Function: bound ],
- complete: [Function: bound ],
- pipe: [Function],
- end: [Object],
- data: [Function] },
- _eventsCount: 5,
- _maxListeners: undefined,
- callback: [Function],
- method: 'POST',
- readable: true,
- writable: true,
- explicitMethod: true,
- _qs:
- Querystring {
- request: [Circular],
- lib: [Object],
- useQuerystring: undefined,
- parseOptions: {},
- stringifyOptions: {} },
- _auth:
- Auth {
- request: [Circular],
- hasAuth: true,
- sentAuth: true,
- bearerToken: null,
- user: '3gerywrqpkk1j5j',
- pass: '<redacted>' },
- _oauth: OAuth { request: [Circular], params: null },
- _multipart:
- Multipart {
- request: [Circular],
- boundary: 'b5791c28-0cff-49ec-997e-b38b55234e96',
- chunked: false,
- body: null },
- _redirect:
- Redirect {
- request: [Circular],
- followRedirect: true,
- followRedirects: true,
- followAllRedirects: false,
- allowRedirect: [Function],
- maxRedirects: 10,
- redirects: [],
- redirectsFollowed: 0,
- removeRefererHeader: false },
- _tunnel:
- Tunnel {
- request: [Circular],
- proxyHeaderWhiteList: [Object],
- proxyHeaderExclusiveList: [] },
- headers:
- { authorization: 'Basic M2dlcnl3cnFwa2sxajVqOmd3eDNpOWY1cW03aTg3cg==',
- accept: 'application/json',
- 'content-type': 'application/json',
- 'content-length': 88 },
- setHeader: [Function],
- hasHeader: [Function],
- getHeader: [Function],
- removeHeader: [Function],
- localAddress: undefined,
- pool: {},
- dests: [],
- __isRequestRequest: true,
- _callback: [Function],
- uri:
- Url {
- protocol: 'https:',
- slashes: true,
- auth: null,
- host: 'api.dropboxapi.com',
- port: 443,
- hostname: 'api.dropboxapi.com',
- hash: null,
- search: null,
- query: null,
- pathname: '/1/oauth2/token',
- path: '/1/oauth2/token',
- href: 'https://api.dropboxapi.com/1/oauth2/token' },
- proxy: null,
- tunnel: true,
- setHost: true,
- originalCookieHeader: undefined,
- _disableCookies: true,
- _jar: undefined,
- port: 443,
- host: 'api.dropboxapi.com',
- path: '/1/oauth2/token',
- _json: true,
- body: '{"code":"5k3cYR2ZStUAAAAAAAAH7yEs8pF7XwISiq7fP0s6-i0","grant_type":"authorization_code"}',
- httpModule:
- { Server: [Object],
- createServer: [Function],
- globalAgent: [Object],
- Agent: [Object],
- request: [Function],
- get: [Function] },
- agentClass: { [Function: Agent] super_: [Object] },
- agent:
- Agent {
- domain: null,
- _events: [Object],
- _eventsCount: 1,
- _maxListeners: undefined,
- defaultPort: 443,
- protocol: 'https:',
- options: [Object],
- requests: {},
- sockets: [Object],
- freeSockets: {},
- keepAliveMsecs: 1000,
- keepAlive: false,
- maxSockets: Infinity,
- maxFreeSockets: 256,
- maxCachedSessions: 100,
- _sessionCache: [Object] },
- _started: true,
- href: 'https://api.dropboxapi.com/1/oauth2/token',
- req:
- ClientRequest {
- domain: null,
- _events: [Object],
- _eventsCount: 4,
- _maxListeners: undefined,
- output: [],
- outputEncodings: [],
- outputCallbacks: [],
- outputSize: 0,
- writable: true,
- _last: true,
- chunkedEncoding: false,
- shouldKeepAlive: false,
- useChunkedEncodingByDefault: true,
- sendDate: false,
- _removedHeader: [Object],
- _contentLength: null,
- _hasBody: true,
- _trailer: '',
- finished: true,
- _headerSent: true,
- socket: [Object],
- connection: [Object],
- _header: 'POST /1/oauth2/token HTTP/1.1\r\nhost: api.dropboxapi.com\r\nauthorization: Basic M2dlcnl3cnFwa2sxajVqOmd3eDNpOWY1cW03aTg3cg==\r\naccept: application/json\r\ncontent-type: application/json\r\ncontent-length: 88\r\nConnection: close\r\n\r\n',
- _headers: [Object],
- _headerNames: [Object],
- _onPendingData: null,
- agent: [Object],
- socketPath: undefined,
- method: 'POST',
- path: '/1/oauth2/token',
- parser: null,
- res: [Circular] },
- ntick: true,
- response: [Circular],
- originalHost: 'api.dropboxapi.com',
- originalHostHeaderName: 'host',
- responseContent: [Circular],
- _destdata: true,
- _ended: true,
- _callbackCalled: true },
- toJSON: [Function: responseToJSON],
- caseless:
- Caseless {
- dict:
- { server: 'nginx',
- date: 'Wed, 27 Jan 2016 13:36:12 GMT',
- 'content-type': 'application/json',
- 'transfer-encoding': 'chunked',
- connection: 'close',
- 'x-dropbox-request-id': '22195df930341e2858563d1c75a33fb4' } },
- read: [Function],
- body:
- { error_description: 'missing required field "grant_type"',
- error: 'invalid_request' } }
- body: { error_description: 'missing required field "grant_type"',
- error: 'invalid_request' }
- $ node getTokenPost.js
- resp: IncomingMessage {
- _readableState:
- ReadableState {
- objectMode: false,
- highWaterMark: 16384,
- buffer: [],
- length: 0,
- pipes: null,
- pipesCount: 0,
- flowing: true,
- ended: true,
- endEmitted: true,
- reading: false,
- sync: true,
- needReadable: false,
- emittedReadable: false,
- readableListening: false,
- resumeScheduled: false,
- defaultEncoding: 'utf8',
- ranOut: false,
- awaitDrain: 0,
- readingMore: false,
- decoder: null,
- encoding: null },
- readable: false,
- domain: null,
- _events:
- { end: [ [Function: responseOnEnd], [Function], [Function], [Function] ],
- close: [ [Function], [Function] ],
- data: [Function],
- error: [Function] },
- _eventsCount: 4,
- _maxListeners: undefined,
- socket:
- TLSSocket {
- _tlsOptions:
- { pipe: null,
- secureContext: [Object],
- isServer: false,
- requestCert: true,
- rejectUnauthorized: true,
- session: undefined,
- NPNProtocols: undefined,
- ALPNProtocols: undefined,
- requestOCSP: undefined },
- _secureEstablished: true,
- _securePending: false,
- _newSessionPending: false,
- _controlReleased: true,
- _SNICallback: null,
- servername: null,
- npnProtocol: false,
- alpnProtocol: false,
- authorized: true,
- authorizationError: null,
- encrypted: true,
- _events:
- { close: [Object],
- end: [Object],
- finish: [Function: onSocketFinish],
- _socketEnd: [Function: onSocketEnd],
- secure: [Function],
- free: [Function: onFree],
- agentRemove: [Function: onRemove],
- drain: [Function: ondrain],
- error: [Object] },
- _eventsCount: 9,
- _connecting: false,
- _hadError: false,
- _handle: null,
- _parent: null,
- _host: 'api.dropboxapi.com',
- _readableState:
- ReadableState {
- objectMode: false,
- highWaterMark: 16384,
- buffer: [],
- length: 0,
- pipes: null,
- pipesCount: 0,
- flowing: true,
- ended: false,
- endEmitted: false,
- reading: true,
- sync: false,
- needReadable: true,
- emittedReadable: false,
- readableListening: false,
- resumeScheduled: false,
- defaultEncoding: 'utf8',
- ranOut: false,
- awaitDrain: 0,
- readingMore: false,
- decoder: null,
- encoding: null },
- readable: false,
- domain: null,
- _maxListeners: 0,
- _writableState:
- WritableState {
- objectMode: false,
- highWaterMark: 16384,
- needDrain: false,
- ending: true,
- ended: true,
- finished: true,
- decodeStrings: false,
- defaultEncoding: 'utf8',
- length: 0,
- writing: false,
- corked: 0,
- sync: false,
- bufferProcessing: false,
- onwrite: [Function],
- writecb: null,
- writelen: 0,
- bufferedRequest: null,
- lastBufferedRequest: null,
- pendingcb: 0,
- prefinished: true,
- errorEmitted: false },
- writable: false,
- allowHalfOpen: false,
- destroyed: true,
- bytesRead: 323,
- _bytesDispatched: 309,
- _sockname: null,
- _pendingData: null,
- _pendingEncoding: '',
- ssl:
- TLSWrap {
- _externalStream: {},
- fd: -22,
- _parent: [Object],
- _parentWrap: undefined,
- _secureContext: [Object],
- reading: true,
- owner: [Circular],
- onread: [Function: noop],
- writeQueueSize: 1,
- onhandshakestart: [Function],
- onhandshakedone: [Function],
- onocspresponse: [Function],
- onerror: [Function] },
- server: undefined,
- _requestCert: true,
- _rejectUnauthorized: true,
- parser: null,
- _httpMessage:
- ClientRequest {
- domain: null,
- _events: [Object],
- _eventsCount: 4,
- _maxListeners: undefined,
- output: [],
- outputEncodings: [],
- outputCallbacks: [],
- outputSize: 0,
- writable: true,
- _last: true,
- chunkedEncoding: false,
- shouldKeepAlive: false,
- useChunkedEncodingByDefault: true,
- sendDate: false,
- _removedHeader: [Object],
- _contentLength: null,
- _hasBody: true,
- _trailer: '',
- finished: true,
- _headerSent: true,
- socket: [Circular],
- connection: [Circular],
- _header: 'POST /1/oauth2/token HTTP/1.1\r\nhost: api.dropboxapi.com\r\naccept: application/json\r\ncontent-type: application/json\r\ncontent-length: 152\r\nConnection: close\r\n\r\n',
- _headers: [Object],
- _headerNames: [Object],
- _onPendingData: null,
- agent: [Object],
- socketPath: undefined,
- method: 'POST',
- path: '/1/oauth2/token',
- parser: null,
- res: [Circular] },
- read: [Function],
- _consuming: true,
- _idleNext: null,
- _idlePrev: null,
- _idleTimeout: -1 },
- connection:
- TLSSocket {
- _tlsOptions:
- { pipe: null,
- secureContext: [Object],
- isServer: false,
- requestCert: true,
- rejectUnauthorized: true,
- session: undefined,
- NPNProtocols: undefined,
- ALPNProtocols: undefined,
- requestOCSP: undefined },
- _secureEstablished: true,
- _securePending: false,
- _newSessionPending: false,
- _controlReleased: true,
- _SNICallback: null,
- servername: null,
- npnProtocol: false,
- alpnProtocol: false,
- authorized: true,
- authorizationError: null,
- encrypted: true,
- _events:
- { close: [Object],
- end: [Object],
- finish: [Function: onSocketFinish],
- _socketEnd: [Function: onSocketEnd],
- secure: [Function],
- free: [Function: onFree],
- agentRemove: [Function: onRemove],
- drain: [Function: ondrain],
- error: [Object] },
- _eventsCount: 9,
- _connecting: false,
- _hadError: false,
- _handle: null,
- _parent: null,
- _host: 'api.dropboxapi.com',
- _readableState:
- ReadableState {
- objectMode: false,
- highWaterMark: 16384,
- buffer: [],
- length: 0,
- pipes: null,
- pipesCount: 0,
- flowing: true,
- ended: false,
- endEmitted: false,
- reading: true,
- sync: false,
- needReadable: true,
- emittedReadable: false,
- readableListening: false,
- resumeScheduled: false,
- defaultEncoding: 'utf8',
- ranOut: false,
- awaitDrain: 0,
- readingMore: false,
- decoder: null,
- encoding: null },
- readable: false,
- domain: null,
- _maxListeners: 0,
- _writableState:
- WritableState {
- objectMode: false,
- highWaterMark: 16384,
- needDrain: false,
- ending: true,
- ended: true,
- finished: true,
- decodeStrings: false,
- defaultEncoding: 'utf8',
- length: 0,
- writing: false,
- corked: 0,
- sync: false,
- bufferProcessing: false,
- onwrite: [Function],
- writecb: null,
- writelen: 0,
- bufferedRequest: null,
- lastBufferedRequest: null,
- pendingcb: 0,
- prefinished: true,
- errorEmitted: false },
- writable: false,
- allowHalfOpen: false,
- destroyed: true,
- bytesRead: 323,
- _bytesDispatched: 309,
- _sockname: null,
- _pendingData: null,
- _pendingEncoding: '',
- ssl:
- TLSWrap {
- _externalStream: {},
- fd: -22,
- _parent: [Object],
- _parentWrap: undefined,
- _secureContext: [Object],
- reading: true,
- owner: [Circular],
- onread: [Function: noop],
- writeQueueSize: 1,
- onhandshakestart: [Function],
- onhandshakedone: [Function],
- onocspresponse: [Function],
- onerror: [Function] },
- server: undefined,
- _requestCert: true,
- _rejectUnauthorized: true,
- parser: null,
- _httpMessage:
- ClientRequest {
- domain: null,
- _events: [Object],
- _eventsCount: 4,
- _maxListeners: undefined,
- output: [],
- outputEncodings: [],
- outputCallbacks: [],
- outputSize: 0,
- writable: true,
- _last: true,
- chunkedEncoding: false,
- shouldKeepAlive: false,
- useChunkedEncodingByDefault: true,
- sendDate: false,
- _removedHeader: [Object],
- _contentLength: null,
- _hasBody: true,
- _trailer: '',
- finished: true,
- _headerSent: true,
- socket: [Circular],
- connection: [Circular],
- _header: 'POST /1/oauth2/token HTTP/1.1\r\nhost: api.dropboxapi.com\r\naccept: application/json\r\ncontent-type: application/json\r\ncontent-length: 152\r\nConnection: close\r\n\r\n',
- _headers: [Object],
- _headerNames: [Object],
- _onPendingData: null,
- agent: [Object],
- socketPath: undefined,
- method: 'POST',
- path: '/1/oauth2/token',
- parser: null,
- res: [Circular] },
- read: [Function],
- _consuming: true,
- _idleNext: null,
- _idlePrev: null,
- _idleTimeout: -1 },
- httpVersionMajor: 1,
- httpVersionMinor: 1,
- httpVersion: '1.1',
- complete: true,
- headers:
- { server: 'nginx',
- date: 'Wed, 27 Jan 2016 13:34:02 GMT',
- 'content-type': 'application/json',
- 'transfer-encoding': 'chunked',
- connection: 'close',
- 'x-dropbox-request-id': 'c6f65265cf4d605b83a903b9dbe0d719' },
- rawHeaders:
- [ 'Server',
- 'nginx',
- 'Date',
- 'Wed, 27 Jan 2016 13:34:02 GMT',
- 'Content-Type',
- 'application/json',
- 'Transfer-Encoding',
- 'chunked',
- 'Connection',
- 'close',
- 'X-Dropbox-Request-Id',
- 'c6f65265cf4d605b83a903b9dbe0d719' ],
- trailers: {},
- rawTrailers: [],
- upgrade: false,
- url: '',
- method: null,
- statusCode: 400,
- statusMessage: 'Bad Request',
- client:
- TLSSocket {
- _tlsOptions:
- { pipe: null,
- secureContext: [Object],
- isServer: false,
- requestCert: true,
- rejectUnauthorized: true,
- session: undefined,
- NPNProtocols: undefined,
- ALPNProtocols: undefined,
- requestOCSP: undefined },
- _secureEstablished: true,
- _securePending: false,
- _newSessionPending: false,
- _controlReleased: true,
- _SNICallback: null,
- servername: null,
- npnProtocol: false,
- alpnProtocol: false,
- authorized: true,
- authorizationError: null,
- encrypted: true,
- _events:
- { close: [Object],
- end: [Object],
- finish: [Function: onSocketFinish],
- _socketEnd: [Function: onSocketEnd],
- secure: [Function],
- free: [Function: onFree],
- agentRemove: [Function: onRemove],
- drain: [Function: ondrain],
- error: [Object] },
- _eventsCount: 9,
- _connecting: false,
- _hadError: false,
- _handle: null,
- _parent: null,
- _host: 'api.dropboxapi.com',
- _readableState:
- ReadableState {
- objectMode: false,
- highWaterMark: 16384,
- buffer: [],
- length: 0,
- pipes: null,
- pipesCount: 0,
- flowing: true,
- ended: false,
- endEmitted: false,
- reading: true,
- sync: false,
- needReadable: true,
- emittedReadable: false,
- readableListening: false,
- resumeScheduled: false,
- defaultEncoding: 'utf8',
- ranOut: false,
- awaitDrain: 0,
- readingMore: false,
- decoder: null,
- encoding: null },
- readable: false,
- domain: null,
- _maxListeners: 0,
- _writableState:
- WritableState {
- objectMode: false,
- highWaterMark: 16384,
- needDrain: false,
- ending: true,
- ended: true,
- finished: true,
- decodeStrings: false,
- defaultEncoding: 'utf8',
- length: 0,
- writing: false,
- corked: 0,
- sync: false,
- bufferProcessing: false,
- onwrite: [Function],
- writecb: null,
- writelen: 0,
- bufferedRequest: null,
- lastBufferedRequest: null,
- pendingcb: 0,
- prefinished: true,
- errorEmitted: false },
- writable: false,
- allowHalfOpen: false,
- destroyed: true,
- bytesRead: 323,
- _bytesDispatched: 309,
- _sockname: null,
- _pendingData: null,
- _pendingEncoding: '',
- ssl:
- TLSWrap {
- _externalStream: {},
- fd: -22,
- _parent: [Object],
- _parentWrap: undefined,
- _secureContext: [Object],
- reading: true,
- owner: [Circular],
- onread: [Function: noop],
- writeQueueSize: 1,
- onhandshakestart: [Function],
- onhandshakedone: [Function],
- onocspresponse: [Function],
- onerror: [Function] },
- server: undefined,
- _requestCert: true,
- _rejectUnauthorized: true,
- parser: null,
- _httpMessage:
- ClientRequest {
- domain: null,
- _events: [Object],
- _eventsCount: 4,
- _maxListeners: undefined,
- output: [],
- outputEncodings: [],
- outputCallbacks: [],
- outputSize: 0,
- writable: true,
- _last: true,
- chunkedEncoding: false,
- shouldKeepAlive: false,
- useChunkedEncodingByDefault: true,
- sendDate: false,
- _removedHeader: [Object],
- _contentLength: null,
- _hasBody: true,
- _trailer: '',
- finished: true,
- _headerSent: true,
- socket: [Circular],
- connection: [Circular],
- _header: 'POST /1/oauth2/token HTTP/1.1\r\nhost: api.dropboxapi.com\r\naccept: application/json\r\ncontent-type: application/json\r\ncontent-length: 152\r\nConnection: close\r\n\r\n',
- _headers: [Object],
- _headerNames: [Object],
- _onPendingData: null,
- agent: [Object],
- socketPath: undefined,
- method: 'POST',
- path: '/1/oauth2/token',
- parser: null,
- res: [Circular] },
- read: [Function],
- _consuming: true,
- _idleNext: null,
- _idlePrev: null,
- _idleTimeout: -1 },
- _consuming: true,
- _dumped: false,
- req:
- ClientRequest {
- domain: null,
- _events:
- { socket: [Object],
- response: [Function: bound ],
- error: [Function: bound ],
- drain: [Function] },
- _eventsCount: 4,
- _maxListeners: undefined,
- output: [],
- outputEncodings: [],
- outputCallbacks: [],
- outputSize: 0,
- writable: true,
- _last: true,
- chunkedEncoding: false,
- shouldKeepAlive: false,
- useChunkedEncodingByDefault: true,
- sendDate: false,
- _removedHeader: { 'content-length': false },
- _contentLength: null,
- _hasBody: true,
- _trailer: '',
- finished: true,
- _headerSent: true,
- socket:
- TLSSocket {
- _tlsOptions: [Object],
- _secureEstablished: true,
- _securePending: false,
- _newSessionPending: false,
- _controlReleased: true,
- _SNICallback: null,
- servername: null,
- npnProtocol: false,
- alpnProtocol: false,
- authorized: true,
- authorizationError: null,
- encrypted: true,
- _events: [Object],
- _eventsCount: 9,
- _connecting: false,
- _hadError: false,
- _handle: null,
- _parent: null,
- _host: 'api.dropboxapi.com',
- _readableState: [Object],
- readable: false,
- domain: null,
- _maxListeners: 0,
- _writableState: [Object],
- writable: false,
- allowHalfOpen: false,
- destroyed: true,
- bytesRead: 323,
- _bytesDispatched: 309,
- _sockname: null,
- _pendingData: null,
- _pendingEncoding: '',
- ssl: [Object],
- server: undefined,
- _requestCert: true,
- _rejectUnauthorized: true,
- parser: null,
- _httpMessage: [Circular],
- read: [Function],
- _consuming: true,
- _idleNext: null,
- _idlePrev: null,
- _idleTimeout: -1 },
- connection:
- TLSSocket {
- _tlsOptions: [Object],
- _secureEstablished: true,
- _securePending: false,
- _newSessionPending: false,
- _controlReleased: true,
- _SNICallback: null,
- servername: null,
- npnProtocol: false,
- alpnProtocol: false,
- authorized: true,
- authorizationError: null,
- encrypted: true,
- _events: [Object],
- _eventsCount: 9,
- _connecting: false,
- _hadError: false,
- _handle: null,
- _parent: null,
- _host: 'api.dropboxapi.com',
- _readableState: [Object],
- readable: false,
- domain: null,
- _maxListeners: 0,
- _writableState: [Object],
- writable: false,
- allowHalfOpen: false,
- destroyed: true,
- bytesRead: 323,
- _bytesDispatched: 309,
- _sockname: null,
- _pendingData: null,
- _pendingEncoding: '',
- ssl: [Object],
- server: undefined,
- _requestCert: true,
- _rejectUnauthorized: true,
- parser: null,
- _httpMessage: [Circular],
- read: [Function],
- _consuming: true,
- _idleNext: null,
- _idlePrev: null,
- _idleTimeout: -1 },
- _header: 'POST /1/oauth2/token HTTP/1.1\r\nhost: api.dropboxapi.com\r\naccept: application/json\r\ncontent-type: application/json\r\ncontent-length: 152\r\nConnection: close\r\n\r\n',
- _headers:
- { host: 'api.dropboxapi.com',
- accept: 'application/json',
- 'content-type': 'application/json',
- 'content-length': 152 },
- _headerNames:
- { host: 'host',
- accept: 'accept',
- 'content-type': 'content-type',
- 'content-length': 'content-length' },
- _onPendingData: null,
- agent:
- Agent {
- domain: null,
- _events: [Object],
- _eventsCount: 1,
- _maxListeners: undefined,
- defaultPort: 443,
- protocol: 'https:',
- options: [Object],
- requests: {},
- sockets: [Object],
- freeSockets: {},
- keepAliveMsecs: 1000,
- keepAlive: false,
- maxSockets: Infinity,
- maxFreeSockets: 256,
- maxCachedSessions: 100,
- _sessionCache: [Object] },
- socketPath: undefined,
- method: 'POST',
- path: '/1/oauth2/token',
- parser: null,
- res: [Circular] },
- request:
- Request {
- domain: null,
- _events:
- { error: [Function: bound ],
- complete: [Function: bound ],
- pipe: [Function],
- end: [Object],
- data: [Function] },
- _eventsCount: 5,
- _maxListeners: undefined,
- callback: [Function],
- method: 'POST',
- readable: true,
- writable: true,
- explicitMethod: true,
- _qs:
- Querystring {
- request: [Circular],
- lib: [Object],
- useQuerystring: undefined,
- parseOptions: {},
- stringifyOptions: {} },
- _auth:
- Auth {
- request: [Circular],
- hasAuth: false,
- sentAuth: false,
- bearerToken: null,
- user: null,
- pass: null },
- _oauth: OAuth { request: [Circular], params: null },
- _multipart:
- Multipart {
- request: [Circular],
- boundary: '7d98b264-65ef-4917-9f14-80f876f64be1',
- chunked: false,
- body: null },
- _redirect:
- Redirect {
- request: [Circular],
- followRedirect: true,
- followRedirects: true,
- followAllRedirects: false,
- allowRedirect: [Function],
- maxRedirects: 10,
- redirects: [],
- redirectsFollowed: 0,
- removeRefererHeader: false },
- _tunnel:
- Tunnel {
- request: [Circular],
- proxyHeaderWhiteList: [Object],
- proxyHeaderExclusiveList: [] },
- headers:
- { accept: 'application/json',
- 'content-type': 'application/json',
- 'content-length': 152 },
- setHeader: [Function],
- hasHeader: [Function],
- getHeader: [Function],
- removeHeader: [Function],
- localAddress: undefined,
- pool: {},
- dests: [],
- __isRequestRequest: true,
- _callback: [Function],
- uri:
- Url {
- protocol: 'https:',
- slashes: true,
- auth: null,
- host: 'api.dropboxapi.com',
- port: 443,
- hostname: 'api.dropboxapi.com',
- hash: null,
- search: null,
- query: null,
- pathname: '/1/oauth2/token',
- path: '/1/oauth2/token',
- href: 'https://api.dropboxapi.com/1/oauth2/token' },
- proxy: null,
- tunnel: true,
- setHost: true,
- originalCookieHeader: undefined,
- _disableCookies: true,
- _jar: undefined,
- port: 443,
- host: 'api.dropboxapi.com',
- path: '/1/oauth2/token',
- _json: true,
- body: '{"code":"5k3cYR2ZStUAAAAAAAAH7yEs8pF7XwISiq7fP0s6-i0","grant_type":"authorization_code","client_id":"3gerywrqpkk1j5j","client_secret":"<redacted>"}',
- httpModule:
- { Server: [Object],
- createServer: [Function],
- globalAgent: [Object],
- Agent: [Object],
- request: [Function],
- get: [Function] },
- agentClass: { [Function: Agent] super_: [Object] },
- agent:
- Agent {
- domain: null,
- _events: [Object],
- _eventsCount: 1,
- _maxListeners: undefined,
- defaultPort: 443,
- protocol: 'https:',
- options: [Object],
- requests: {},
- sockets: [Object],
- freeSockets: {},
- keepAliveMsecs: 1000,
- keepAlive: false,
- maxSockets: Infinity,
- maxFreeSockets: 256,
- maxCachedSessions: 100,
- _sessionCache: [Object] },
- _started: true,
- href: 'https://api.dropboxapi.com/1/oauth2/token',
- req:
- ClientRequest {
- domain: null,
- _events: [Object],
- _eventsCount: 4,
- _maxListeners: undefined,
- output: [],
- outputEncodings: [],
- outputCallbacks: [],
- outputSize: 0,
- writable: true,
- _last: true,
- chunkedEncoding: false,
- shouldKeepAlive: false,
- useChunkedEncodingByDefault: true,
- sendDate: false,
- _removedHeader: [Object],
- _contentLength: null,
- _hasBody: true,
- _trailer: '',
- finished: true,
- _headerSent: true,
- socket: [Object],
- connection: [Object],
- _header: 'POST /1/oauth2/token HTTP/1.1\r\nhost: api.dropboxapi.com\r\naccept: application/json\r\ncontent-type: application/json\r\ncontent-length: 152\r\nConnection: close\r\n\r\n',
- _headers: [Object],
- _headerNames: [Object],
- _onPendingData: null,
- agent: [Object],
- socketPath: undefined,
- method: 'POST',
- path: '/1/oauth2/token',
- parser: null,
- res: [Circular] },
- ntick: true,
- response: [Circular],
- originalHost: 'api.dropboxapi.com',
- originalHostHeaderName: 'host',
- responseContent: [Circular],
- _destdata: true,
- _ended: true,
- _callbackCalled: true },
- toJSON: [Function: responseToJSON],
- caseless:
- Caseless {
- dict:
- { server: 'nginx',
- date: 'Wed, 27 Jan 2016 13:34:02 GMT',
- 'content-type': 'application/json',
- 'transfer-encoding': 'chunked',
- connection: 'close',
- 'x-dropbox-request-id': 'c6f65265cf4d605b83a903b9dbe0d719' } },
- read: [Function],
- body:
- { error_description: 'No auth function available for given request',
- error: 'invalid_request' } }
- body: { error_description: 'No auth function available for given request',
- error: 'invalid_request' }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement