Skip to content

Instantly share code, notes, and snippets.

@anderskitson
Created February 23, 2022 05:34
Show Gist options
  • Save anderskitson/8e656a0d80d924dd3f3cd06250e6688c to your computer and use it in GitHub Desktop.
Save anderskitson/8e656a0d80d924dd3f3cd06250e6688c to your computer and use it in GitHub Desktop.
promise
allll [
<ref *1> IncomingMessage {
_readableState: ReadableState {
objectMode: false,
highWaterMark: 16384,
buffer: BufferList { head: null, tail: null, length: 0 },
length: 0,
pipes: [],
flowing: false,
ended: true,
endEmitted: true,
reading: false,
constructed: true,
sync: true,
needReadable: false,
emittedReadable: false,
readableListening: false,
resumeScheduled: false,
errorEmitted: false,
emitClose: true,
autoDestroy: true,
destroyed: true,
errored: null,
closed: true,
closeEmitted: true,
defaultEncoding: 'utf8',
awaitDrainWriters: SafeSet(0) [Set] {},
multiAwaitDrain: true,
readingMore: true,
dataEmitted: true,
decoder: null,
encoding: null,
[Symbol(kPaused)]: true
},
_events: [Object: null prototype] {
end: [Array],
close: [Array],
finish: [Array],
error: [Array]
},
_eventsCount: 4,
_maxListeners: undefined,
socket: TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
secureConnecting: false,
_SNICallback: null,
servername: 'api.twitter.com',
alpnProtocol: false,
authorized: true,
authorizationError: null,
encrypted: true,
_events: [Object: null prototype],
_eventsCount: 10,
connecting: false,
_hadError: false,
_parent: null,
_host: 'api.twitter.com',
_readableState: [ReadableState],
_maxListeners: undefined,
_writableState: [WritableState],
allowHalfOpen: false,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: [TLSWrap],
_requestCert: true,
_rejectUnauthorized: true,
parser: null,
_httpMessage: [ClientRequest],
on_socket_end: [Function: on_socket_end],
[Symbol(res)]: [TLSWrap],
[Symbol(verified)]: true,
[Symbol(pendingSession)]: null,
[Symbol(async_id_symbol)]: 217286,
[Symbol(kHandle)]: [TLSWrap],
[Symbol(kSetNoDelay)]: false,
[Symbol(lastWriteQueueSize)]: 0,
[Symbol(timeout)]: null,
[Symbol(kBuffer)]: null,
[Symbol(kBufferCb)]: null,
[Symbol(kBufferGen)]: null,
[Symbol(kCapture)]: false,
[Symbol(kBytesRead)]: 0,
[Symbol(kBytesWritten)]: 0,
[Symbol(connect-options)]: [Object],
[Symbol(RequestTimeout)]: undefined
},
httpVersionMajor: 1,
httpVersionMinor: 1,
httpVersion: '1.1',
complete: true,
rawHeaders: [
'date',
'Wed, 23 Feb 2022 05:32:41 UTC',
'server',
'tsa_a',
'set-cookie',
'guest_id_marketing=v1%3A164559436118796137; Max-Age=63072000; Expires=Fri, 23 Feb 2024 05:32:41 GMT; Path=/; Domain=.twitter.com; Secure; SameSite=None',
'set-cookie',
'guest_id_ads=v1%3A164559436118796137; Max-Age=63072000; Expires=Fri, 23 Feb 2024 05:32:41 GMT; Path=/; Domain=.twitter.com; Secure; SameSite=None',
'set-cookie',
'personalization_id="v1_txj+2vB7FiaS+fZcfuugvA=="; Max-Age=63072000; Expires=Fri, 23 Feb 2024 05:32:41 GMT; Path=/; Domain=.twitter.com; Secure; SameSite=None',
'set-cookie',
'guest_id=v1%3A164559436118796137; Max-Age=63072000; Expires=Fri, 23 Feb 2024 05:32:41 GMT; Path=/; Domain=.twitter.com; Secure; SameSite=None',
'api-version',
'2.36',
'content-type',
'application/json; charset=utf-8',
'cache-control',
'no-cache, no-store, max-age=0',
'content-length',
'416',
'x-access-level',
'read',
'x-frame-options',
'SAMEORIGIN',
'x-xss-protection',
'0',
'x-rate-limit-limit',
'450',
'x-rate-limit-reset',
'1645595261',
'content-disposition',
'attachment; filename=json.json',
'x-content-type-options',
'nosniff',
'x-rate-limit-remaining',
'448',
'strict-transport-security',
'max-age=631138519',
'x-response-time',
'81',
'x-connection-hash',
'2eefcd998e486076802bfea7cd1604a604ad6ba5ffec97b838402ffae2f65c14',
'connection',
'close'
],
rawTrailers: [],
aborted: false,
upgrade: false,
url: '',
method: null,
statusCode: 200,
statusMessage: 'OK',
client: TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
secureConnecting: false,
_SNICallback: null,
servername: 'api.twitter.com',
alpnProtocol: false,
authorized: true,
authorizationError: null,
encrypted: true,
_events: [Object: null prototype],
_eventsCount: 10,
connecting: false,
_hadError: false,
_parent: null,
_host: 'api.twitter.com',
_readableState: [ReadableState],
_maxListeners: undefined,
_writableState: [WritableState],
allowHalfOpen: false,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: [TLSWrap],
_requestCert: true,
_rejectUnauthorized: true,
parser: null,
_httpMessage: [ClientRequest],
on_socket_end: [Function: on_socket_end],
[Symbol(res)]: [TLSWrap],
[Symbol(verified)]: true,
[Symbol(pendingSession)]: null,
[Symbol(async_id_symbol)]: 217286,
[Symbol(kHandle)]: [TLSWrap],
[Symbol(kSetNoDelay)]: false,
[Symbol(lastWriteQueueSize)]: 0,
[Symbol(timeout)]: null,
[Symbol(kBuffer)]: null,
[Symbol(kBufferCb)]: null,
[Symbol(kBufferGen)]: null,
[Symbol(kCapture)]: false,
[Symbol(kBytesRead)]: 0,
[Symbol(kBytesWritten)]: 0,
[Symbol(connect-options)]: [Object],
[Symbol(RequestTimeout)]: undefined
},
_consuming: false,
_dumped: false,
req: ClientRequest {
_events: [Object: null prototype],
_eventsCount: 2,
_maxListeners: undefined,
outputData: [],
outputSize: 0,
writable: true,
destroyed: false,
_last: true,
chunkedEncoding: false,
shouldKeepAlive: false,
maxRequestsOnConnectionReached: false,
_defaultKeepAlive: true,
useChunkedEncodingByDefault: false,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
_contentLength: 0,
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
_closed: false,
socket: [TLSSocket],
_header: 'GET /2/tweets/search/recent?query=%22%24music%22%20from%3Aanderskitson HTTP/1.1\r\n' +
'accept: */*\r\n' +
'user-agent: v2FullArchiveJS\r\n' +
'authorization: Bearer AAAAAAAAAAAAAAAAAAAAACYEZgEAAAAAE0jRv7nk%2B6XwZCqdaxUSiIQPkng%3DhQCr3keDJ11Xjh7ZdYAQjUM6LbOMKu43vtcxVNyQBsW6e366mY\r\n' +
'host: api.twitter.com\r\n' +
'Connection: close\r\n' +
'\r\n',
_keepAliveTimeout: 0,
_onPendingData: [Function: nop],
agent: [Agent],
socketPath: undefined,
method: 'GET',
maxHeaderSize: undefined,
insecureHTTPParser: undefined,
path: '/2/tweets/search/recent?query=%22%24music%22%20from%3Aanderskitson',
_ended: true,
res: [Circular *1],
aborted: false,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
reusedSocket: false,
host: 'api.twitter.com',
protocol: 'https:',
[Symbol(kCapture)]: false,
[Symbol(kNeedDrain)]: false,
[Symbol(corked)]: 0,
[Symbol(kOutHeaders)]: [Object: null prototype]
},
cookies: {
guest_id_marketing: 'v1:164559436118796137',
guest_id_ads: 'v1:164559436118796137',
personalization_id: 'v1_txj+2vB7FiaS+fZcfuugvA==',
guest_id: 'v1:164559436118796137'
},
raw: <Buffer 7b 22 64 61 74 61 22 3a 5b 7b 22 69 64 22 3a 22 31 34 39 34 30 38 33 35 35 33 36 39 32 32 39 35 31 37 31 22 2c 22 74 65 78 74 22 3a 22 40 61 6c 65 78 ... 366 more bytes>,
body: { data: [Array], meta: [Object] },
bytes: 416,
parser: 'json',
[Symbol(kCapture)]: false,
[Symbol(kHeaders)]: {
date: 'Wed, 23 Feb 2022 05:32:41 UTC',
server: 'tsa_a',
'set-cookie': [Array],
'api-version': '2.36',
'content-type': 'application/json; charset=utf-8',
'cache-control': 'no-cache, no-store, max-age=0',
'content-length': '416',
'x-access-level': 'read',
'x-frame-options': 'SAMEORIGIN',
'x-xss-protection': '0',
'x-rate-limit-limit': '450',
'x-rate-limit-reset': '1645595261',
'content-disposition': 'attachment; filename=json.json',
'x-content-type-options': 'nosniff',
'x-rate-limit-remaining': '448',
'strict-transport-security': 'max-age=631138519',
'x-response-time': '81',
'x-connection-hash': '2eefcd998e486076802bfea7cd1604a604ad6ba5ffec97b838402ffae2f65c14',
connection: 'close'
},
[Symbol(kHeadersCount)]: 44,
[Symbol(kTrailers)]: null,
[Symbol(kTrailersCount)]: 0,
[Symbol(RequestTimeout)]: undefined
},
<ref *2> IncomingMessage {
_readableState: ReadableState {
objectMode: false,
highWaterMark: 16384,
buffer: BufferList { head: null, tail: null, length: 0 },
length: 0,
pipes: [],
flowing: false,
ended: true,
endEmitted: true,
reading: false,
constructed: true,
sync: true,
needReadable: false,
emittedReadable: false,
readableListening: false,
resumeScheduled: false,
errorEmitted: false,
emitClose: true,
autoDestroy: true,
destroyed: true,
errored: null,
closed: true,
closeEmitted: true,
defaultEncoding: 'utf8',
awaitDrainWriters: SafeSet(0) [Set] {},
multiAwaitDrain: true,
readingMore: true,
dataEmitted: true,
decoder: null,
encoding: null,
[Symbol(kPaused)]: true
},
_events: [Object: null prototype] {
end: [Array],
close: [Array],
finish: [Array],
error: [Array]
},
_eventsCount: 4,
_maxListeners: undefined,
socket: TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
secureConnecting: false,
_SNICallback: null,
servername: 'api.twitter.com',
alpnProtocol: false,
authorized: true,
authorizationError: null,
encrypted: true,
_events: [Object: null prototype],
_eventsCount: 10,
connecting: false,
_hadError: false,
_parent: null,
_host: 'api.twitter.com',
_readableState: [ReadableState],
_maxListeners: undefined,
_writableState: [WritableState],
allowHalfOpen: false,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: [TLSWrap],
_requestCert: true,
_rejectUnauthorized: true,
parser: null,
_httpMessage: [ClientRequest],
on_socket_end: [Function: on_socket_end],
[Symbol(res)]: [TLSWrap],
[Symbol(verified)]: true,
[Symbol(pendingSession)]: null,
[Symbol(async_id_symbol)]: 217292,
[Symbol(kHandle)]: [TLSWrap],
[Symbol(kSetNoDelay)]: false,
[Symbol(lastWriteQueueSize)]: 0,
[Symbol(timeout)]: null,
[Symbol(kBuffer)]: null,
[Symbol(kBufferCb)]: null,
[Symbol(kBufferGen)]: null,
[Symbol(kCapture)]: false,
[Symbol(kBytesRead)]: 0,
[Symbol(kBytesWritten)]: 0,
[Symbol(connect-options)]: [Object],
[Symbol(RequestTimeout)]: undefined
},
httpVersionMajor: 1,
httpVersionMinor: 1,
httpVersion: '1.1',
complete: true,
rawHeaders: [
'date',
'Wed, 23 Feb 2022 05:32:41 UTC',
'server',
'tsa_a',
'set-cookie',
'guest_id_marketing=v1%3A164559436119180022; Max-Age=63072000; Expires=Fri, 23 Feb 2024 05:32:41 GMT; Path=/; Domain=.twitter.com; Secure; SameSite=None',
'set-cookie',
'guest_id_ads=v1%3A164559436119180022; Max-Age=63072000; Expires=Fri, 23 Feb 2024 05:32:41 GMT; Path=/; Domain=.twitter.com; Secure; SameSite=None',
'set-cookie',
'personalization_id="v1_e1vngEx47RIqUT9DLlPd0Q=="; Max-Age=63072000; Expires=Fri, 23 Feb 2024 05:32:41 GMT; Path=/; Domain=.twitter.com; Secure; SameSite=None',
'set-cookie',
'guest_id=v1%3A164559436119180022; Max-Age=63072000; Expires=Fri, 23 Feb 2024 05:32:41 GMT; Path=/; Domain=.twitter.com; Secure; SameSite=None',
'api-version',
'2.36',
'content-type',
'application/json; charset=utf-8',
'cache-control',
'no-cache, no-store, max-age=0',
'content-length',
'333',
'x-access-level',
'read',
'x-frame-options',
'SAMEORIGIN',
'x-xss-protection',
'0',
'x-rate-limit-limit',
'450',
'x-rate-limit-reset',
'1645595261',
'content-disposition',
'attachment; filename=json.json',
'x-content-type-options',
'nosniff',
'x-rate-limit-remaining',
'446',
'strict-transport-security',
'max-age=631138519',
'x-response-time',
'65',
'x-connection-hash',
'721e45f0fa0e54e9bc2c33be90d4d8f9f6f18d2cc3347e913001613aafdd48e6',
'connection',
'close'
],
rawTrailers: [],
aborted: false,
upgrade: false,
url: '',
method: null,
statusCode: 200,
statusMessage: 'OK',
client: TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
secureConnecting: false,
_SNICallback: null,
servername: 'api.twitter.com',
alpnProtocol: false,
authorized: true,
authorizationError: null,
encrypted: true,
_events: [Object: null prototype],
_eventsCount: 10,
connecting: false,
_hadError: false,
_parent: null,
_host: 'api.twitter.com',
_readableState: [ReadableState],
_maxListeners: undefined,
_writableState: [WritableState],
allowHalfOpen: false,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: [TLSWrap],
_requestCert: true,
_rejectUnauthorized: true,
parser: null,
_httpMessage: [ClientRequest],
on_socket_end: [Function: on_socket_end],
[Symbol(res)]: [TLSWrap],
[Symbol(verified)]: true,
[Symbol(pendingSession)]: null,
[Symbol(async_id_symbol)]: 217292,
[Symbol(kHandle)]: [TLSWrap],
[Symbol(kSetNoDelay)]: false,
[Symbol(lastWriteQueueSize)]: 0,
[Symbol(timeout)]: null,
[Symbol(kBuffer)]: null,
[Symbol(kBufferCb)]: null,
[Symbol(kBufferGen)]: null,
[Symbol(kCapture)]: false,
[Symbol(kBytesRead)]: 0,
[Symbol(kBytesWritten)]: 0,
[Symbol(connect-options)]: [Object],
[Symbol(RequestTimeout)]: undefined
},
_consuming: false,
_dumped: false,
req: ClientRequest {
_events: [Object: null prototype],
_eventsCount: 2,
_maxListeners: undefined,
outputData: [],
outputSize: 0,
writable: true,
destroyed: false,
_last: true,
chunkedEncoding: false,
shouldKeepAlive: false,
maxRequestsOnConnectionReached: false,
_defaultKeepAlive: true,
useChunkedEncodingByDefault: false,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
_contentLength: 0,
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
_closed: false,
socket: [TLSSocket],
_header: 'GET /2/tweets/search/recent?query=%22%24music%22%20from%3Askaterhyo HTTP/1.1\r\n' +
'accept: */*\r\n' +
'user-agent: v2FullArchiveJS\r\n' +
'authorization: Bearer AAAAAAAAAAAAAAAAAAAAACYEZgEAAAAAE0jRv7nk%2B6XwZCqdaxUSiIQPkng%3DhQCr3keDJ11Xjh7ZdYAQjUM6LbOMKu43vtcxVNyQBsW6e366mY\r\n' +
'host: api.twitter.com\r\n' +
'Connection: close\r\n' +
'\r\n',
_keepAliveTimeout: 0,
_onPendingData: [Function: nop],
agent: [Agent],
socketPath: undefined,
method: 'GET',
maxHeaderSize: undefined,
insecureHTTPParser: undefined,
path: '/2/tweets/search/recent?query=%22%24music%22%20from%3Askaterhyo',
_ended: true,
res: [Circular *2],
aborted: false,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
reusedSocket: false,
host: 'api.twitter.com',
protocol: 'https:',
[Symbol(kCapture)]: false,
[Symbol(kNeedDrain)]: false,
[Symbol(corked)]: 0,
[Symbol(kOutHeaders)]: [Object: null prototype]
},
cookies: {
guest_id_marketing: 'v1:164559436119180022',
guest_id_ads: 'v1:164559436119180022',
personalization_id: 'v1_e1vngEx47RIqUT9DLlPd0Q==',
guest_id: 'v1:164559436119180022'
},
raw: <Buffer 7b 22 64 61 74 61 22 3a 5b 7b 22 69 64 22 3a 22 31 34 39 36 33 31 39 31 30 39 32 38 35 37 31 31 38 37 35 22 2c 22 74 65 78 74 22 3a 22 53 54 4f 50 20 ... 283 more bytes>,
body: { data: [Array], meta: [Object] },
bytes: 333,
parser: 'json',
[Symbol(kCapture)]: false,
[Symbol(kHeaders)]: {
date: 'Wed, 23 Feb 2022 05:32:41 UTC',
server: 'tsa_a',
'set-cookie': [Array],
'api-version': '2.36',
'content-type': 'application/json; charset=utf-8',
'cache-control': 'no-cache, no-store, max-age=0',
'content-length': '333',
'x-access-level': 'read',
'x-frame-options': 'SAMEORIGIN',
'x-xss-protection': '0',
'x-rate-limit-limit': '450',
'x-rate-limit-reset': '1645595261',
'content-disposition': 'attachment; filename=json.json',
'x-content-type-options': 'nosniff',
'x-rate-limit-remaining': '446',
'strict-transport-security': 'max-age=631138519',
'x-response-time': '65',
'x-connection-hash': '721e45f0fa0e54e9bc2c33be90d4d8f9f6f18d2cc3347e913001613aafdd48e6',
connection: 'close'
},
[Symbol(kHeadersCount)]: 44,
[Symbol(kTrailers)]: null,
[Symbol(kTrailersCount)]: 0,
[Symbol(RequestTimeout)]: undefined
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment