Skip to content

Instantly share code, notes, and snippets.

@jdub
Created March 11, 2012 00:41
Show Gist options
  • Save jdub/2014243 to your computer and use it in GitHub Desktop.
Save jdub/2014243 to your computer and use it in GitHub Desktop.
ERROR: null
RESPONSE: { socket:
{ pair:
{ _secureEstablished: true,
_isServer: false,
_encWriteState: true,
_clearWriteState: true,
_doneFlag: false,
credentials: [Object],
_rejectUnauthorized: false,
_requestCert: true,
ssl: {},
servername: false,
cleartext: [Circular],
encrypted: [Object],
fd: undefined,
_events: [Object],
_writeCalled: false,
cycleEncryptedPullLock: false,
cycleCleartextPullLock: false,
cycleCleartextPushLock: true,
cycleEncryptedPushLock: false },
writable: true,
readable: true,
_paused: false,
_needDrain: false,
_pending: [],
_pendingCallbacks: [],
_pendingBytes: 0,
socket:
{ _handle: [Object],
_pendingWriteReqs: 0,
_flags: 0,
_connectQueueSize: 0,
destroyed: false,
bytesRead: 3346,
bytesWritten: 916,
allowHalfOpen: undefined,
_events: [Object],
_pipeCount: 1,
_connecting: false,
writable: true,
_connectQueue: null,
readable: true },
encrypted:
{ pair: [Object],
writable: true,
readable: true,
_paused: false,
_needDrain: false,
_pending: [],
_pendingCallbacks: [],
_pendingBytes: 0,
_events: [Object],
_pipeCount: 1 },
authorized: true,
_controlReleased: true,
_events:
{ free: [Function],
close: [Object],
agentRemove: [Function],
error: [Function] },
_httpMessage:
{ output: [],
outputEncodings: [],
writable: true,
_last: false,
chunkedEncoding: false,
shouldKeepAlive: true,
useChunkedEncodingByDefault: false,
_hasBody: true,
_trailer: '',
finished: true,
agent: [Object],
socketPath: undefined,
method: 'GET',
path: '/1/statuses/home_timeline.json',
_events: [Object],
_headers: [Object],
_headerNames: [Object],
_header: 'GET /1/statuses/home_timeline.json HTTP/1.1\r\nhost: api.twitter.com\r\nauthorization: OAuth count="5",include_entities="1",oauth_consumer_key="edH6NoU0pVDGEk0JUT9mQ",oauth_nonce="EAE4F4FADE524A8390D0652F8443D966",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1331426474",oauth_token="4690301-t9epqb3QCJoRIBC7La6QiOup4te3Q99fUTGCKalZ0",oauth_version="1.0",oauth_signature="o3pE79Qs6hiUoPUVm9WYmiDSVbI%3D"\r\ncontent-length: 0\r\nConnection: keep-alive\r\n\r\n',
_headerSent: true,
socket: [Circular],
connection: [Circular],
parser: [Object],
res: [Circular] },
ondrain: [Function],
ondata: [Function],
onend: [Function],
npnProtocol: undefined },
connection:
{ pair:
{ _secureEstablished: true,
_isServer: false,
_encWriteState: true,
_clearWriteState: true,
_doneFlag: false,
credentials: [Object],
_rejectUnauthorized: false,
_requestCert: true,
ssl: {},
servername: false,
cleartext: [Circular],
encrypted: [Object],
fd: undefined,
_events: [Object],
_writeCalled: false,
cycleEncryptedPullLock: false,
cycleCleartextPullLock: false,
cycleCleartextPushLock: true,
cycleEncryptedPushLock: false },
writable: true,
readable: true,
_paused: false,
_needDrain: false,
_pending: [],
_pendingCallbacks: [],
_pendingBytes: 0,
socket:
{ _handle: [Object],
_pendingWriteReqs: 0,
_flags: 0,
_connectQueueSize: 0,
destroyed: false,
bytesRead: 3346,
bytesWritten: 916,
allowHalfOpen: undefined,
_events: [Object],
_pipeCount: 1,
_connecting: false,
writable: true,
_connectQueue: null,
readable: true },
encrypted:
{ pair: [Object],
writable: true,
readable: true,
_paused: false,
_needDrain: false,
_pending: [],
_pendingCallbacks: [],
_pendingBytes: 0,
_events: [Object],
_pipeCount: 1 },
authorized: true,
_controlReleased: true,
_events:
{ free: [Function],
close: [Object],
agentRemove: [Function],
error: [Function] },
_httpMessage:
{ output: [],
outputEncodings: [],
writable: true,
_last: false,
chunkedEncoding: false,
shouldKeepAlive: true,
useChunkedEncodingByDefault: false,
_hasBody: true,
_trailer: '',
finished: true,
agent: [Object],
socketPath: undefined,
method: 'GET',
path: '/1/statuses/home_timeline.json',
_events: [Object],
_headers: [Object],
_headerNames: [Object],
_header: 'GET /1/statuses/home_timeline.json HTTP/1.1\r\nhost: api.twitter.com\r\nauthorization: OAuth count="5",include_entities="1",oauth_consumer_key="edH6NoU0pVDGEk0JUT9mQ",oauth_nonce="EAE4F4FADE524A8390D0652F8443D966",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1331426474",oauth_token="4690301-t9epqb3QCJoRIBC7La6QiOup4te3Q99fUTGCKalZ0",oauth_version="1.0",oauth_signature="o3pE79Qs6hiUoPUVm9WYmiDSVbI%3D"\r\ncontent-length: 0\r\nConnection: keep-alive\r\n\r\n',
_headerSent: true,
socket: [Circular],
connection: [Circular],
parser: [Object],
res: [Circular] },
ondrain: [Function],
ondata: [Function],
onend: [Function],
npnProtocol: undefined },
httpVersion: '1.1',
complete: true,
headers:
{ date: 'Sun, 11 Mar 2012 00:41:15 GMT',
status: '401 Unauthorized',
'cache-control': 'no-cache, max-age=300',
'content-length': '92',
'x-runtime': '0.01700',
'www-authenticate': 'OAuth realm="https://api.twitter.com"',
'content-type': 'application/json; charset=utf-8',
'set-cookie':
[ 'k=10.34.232.116.1331426475848021; path=/; expires=Sun, 18-Mar-12 00:41:15 GMT; domain=.twitter.com',
'guest_id=v1%3A133142647585168393; domain=.twitter.com; path=/; expires=Tue, 11-Mar-2014 12:41:15 GMT',
'_twitter_sess=BAh7CDoPY3JlYXRlZF9hdGwrCFu%252FM%252F81AToHaWQiJWQ4MWVmODMzNThiZTE0%250AMjk1MDRiY2IxODdkY2I1NWVkIgpmbGFzaElDOidBY3Rpb25Db250cm9sbGVy%250AOjpGbGFzaDo6Rmxhc2hIYXNoewAGOgpAdXNlZHsA--b4aafd87ab4ff1d791c0c3215be8fb522dcd1a16; domain=.twitter.com; path=/; HttpOnly' ],
expires: 'Sun, 11 Mar 2012 00:46:15 GMT',
vary: 'Accept-Encoding',
server: 'tfe' },
trailers: {},
readable: false,
url: '',
method: null,
statusCode: 401,
client:
{ pair:
{ _secureEstablished: true,
_isServer: false,
_encWriteState: true,
_clearWriteState: true,
_doneFlag: false,
credentials: [Object],
_rejectUnauthorized: false,
_requestCert: true,
ssl: {},
servername: false,
cleartext: [Circular],
encrypted: [Object],
fd: undefined,
_events: [Object],
_writeCalled: false,
cycleEncryptedPullLock: false,
cycleCleartextPullLock: false,
cycleCleartextPushLock: true,
cycleEncryptedPushLock: false },
writable: true,
readable: true,
_paused: false,
_needDrain: false,
_pending: [],
_pendingCallbacks: [],
_pendingBytes: 0,
socket:
{ _handle: [Object],
_pendingWriteReqs: 0,
_flags: 0,
_connectQueueSize: 0,
destroyed: false,
bytesRead: 3346,
bytesWritten: 916,
allowHalfOpen: undefined,
_events: [Object],
_pipeCount: 1,
_connecting: false,
writable: true,
_connectQueue: null,
readable: true },
encrypted:
{ pair: [Object],
writable: true,
readable: true,
_paused: false,
_needDrain: false,
_pending: [],
_pendingCallbacks: [],
_pendingBytes: 0,
_events: [Object],
_pipeCount: 1 },
authorized: true,
_controlReleased: true,
_events:
{ free: [Function],
close: [Object],
agentRemove: [Function],
error: [Function] },
_httpMessage:
{ output: [],
outputEncodings: [],
writable: true,
_last: false,
chunkedEncoding: false,
shouldKeepAlive: true,
useChunkedEncodingByDefault: false,
_hasBody: true,
_trailer: '',
finished: true,
agent: [Object],
socketPath: undefined,
method: 'GET',
path: '/1/statuses/home_timeline.json',
_events: [Object],
_headers: [Object],
_headerNames: [Object],
_header: 'GET /1/statuses/home_timeline.json HTTP/1.1\r\nhost: api.twitter.com\r\nauthorization: OAuth count="5",include_entities="1",oauth_consumer_key="edH6NoU0pVDGEk0JUT9mQ",oauth_nonce="EAE4F4FADE524A8390D0652F8443D966",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1331426474",oauth_token="4690301-t9epqb3QCJoRIBC7La6QiOup4te3Q99fUTGCKalZ0",oauth_version="1.0",oauth_signature="o3pE79Qs6hiUoPUVm9WYmiDSVbI%3D"\r\ncontent-length: 0\r\nConnection: keep-alive\r\n\r\n',
_headerSent: true,
socket: [Circular],
connection: [Circular],
parser: [Object],
res: [Circular] },
ondrain: [Function],
ondata: [Function],
onend: [Function],
npnProtocol: undefined },
httpVersionMajor: 1,
httpVersionMinor: 1,
upgrade: false,
_events:
{ end: [ [Function], [Function], [Function] ],
close: [ [Function], [Function] ],
data: [Function] },
request:
{ readable: true,
writable: true,
uri:
{ protocol: 'https:',
slashes: true,
host: 'api.twitter.com',
hostname: 'api.twitter.com',
href: 'https://api.twitter.com/1/statuses/home_timeline.json?count=5&include_entities=1',
search: '?count=5&include_entities=1',
query: 'count=5&include_entities=1',
pathname: '/1/statuses/home_timeline.json',
path: '/1/statuses/home_timeline.json?count=5&include_entities=1' },
callback: [Function],
pool: {},
dests: [],
__isRequestRequest: true,
_callback: [Function: dump],
_redirectsFollowed: 0,
maxRedirects: 10,
followRedirect: true,
followAllRedirects: false,
redirects: [],
headers:
{ authorization: 'OAuth count="5",include_entities="1",oauth_consumer_key="edH6NoU0pVDGEk0JUT9mQ",oauth_nonce="EAE4F4FADE524A8390D0652F8443D966",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1331426474",oauth_token="4690301-t9epqb3QCJoRIBC7La6QiOup4te3Q99fUTGCKalZ0",oauth_version="1.0",oauth_signature="o3pE79Qs6hiUoPUVm9WYmiDSVbI%3D"',
'content-length': 0 },
setHost: true,
originalCookieHeader: undefined,
_jar: undefined,
port: 443,
host: 'api.twitter.com',
clientErrorHandler: [Function],
_events:
{ error: [Function],
pipe: [Object],
data: [Function],
end: [Function] },
path: '/1/statuses/home_timeline.json',
httpModule:
{ Server: [Object],
createServer: [Function],
globalAgent: [Object],
Agent: [Object],
request: [Function],
get: [Function] },
agentClass: { [Function: Agent] super_: [Object] },
agent:
{ options: {},
requests: {},
sockets: [Object],
maxSockets: 5,
_events: [Object],
createConnection: [Function: createConnection] },
_started: true,
method: 'GET',
href: 'https://api.twitter.com/1/statuses/home_timeline.json?count=5&include_entities=1',
createConnection: [Function: createConnection],
defaultPort: 443,
req:
{ output: [],
outputEncodings: [],
writable: true,
_last: false,
chunkedEncoding: false,
shouldKeepAlive: true,
useChunkedEncodingByDefault: false,
_hasBody: true,
_trailer: '',
finished: true,
agent: [Object],
socketPath: undefined,
method: 'GET',
path: '/1/statuses/home_timeline.json',
_events: [Object],
_headers: [Object],
_headerNames: [Object],
_header: 'GET /1/statuses/home_timeline.json HTTP/1.1\r\nhost: api.twitter.com\r\nauthorization: OAuth count="5",include_entities="1",oauth_consumer_key="edH6NoU0pVDGEk0JUT9mQ",oauth_nonce="EAE4F4FADE524A8390D0652F8443D966",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1331426474",oauth_token="4690301-t9epqb3QCJoRIBC7La6QiOup4te3Q99fUTGCKalZ0",oauth_version="1.0",oauth_signature="o3pE79Qs6hiUoPUVm9WYmiDSVbI%3D"\r\ncontent-length: 0\r\nConnection: keep-alive\r\n\r\n',
_headerSent: true,
socket: [Object],
connection: [Object],
parser: [Object],
res: [Circular] },
ntick: true,
response: [Circular],
_destdata: true,
_ended: true },
body: '{"error":"Could not authenticate with OAuth.","request":"\\/1\\/statuses\\/home_timeline.json"}' }
DATA: { error: 'Could not authenticate with OAuth.',
request: '/1/statuses/home_timeline.json' }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment