friday
{ status: 1, day: '05', time: '18:00', movie: '01' }
Found. Redirecting to login/booking
Unauthorized
╚
vagrant@vagrant-ubuntu-trusty-32:/vagrant$ node index
friday
{ status: 1, day: '05', time: '18:00', movie: '01' }
Found. Redirecting to login/booking
IncomingMessage {
_readableState:
ReadableState {
objectMode: false,
highWaterMark: 16384,
buffer: BufferList { head: null, tail: null, length: 0 },
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] ],
close: [ [Function], [Function] ],
data: [Function],
error: [Function] },
_eventsCount: 4,
_maxListeners: undefined,
socket:
Socket {
connecting: false,
_hadError: false,
_handle: null,
_parent: null,
_host: 'vhost3.lnu.se',
_readableState:
ReadableState {
objectMode: false,
highWaterMark: 16384,
buffer: [Object],
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,
_events:
{ end: [Object],
finish: [Function: onSocketFinish],
_socketEnd: [Function: onSocketEnd],
free: [Function: onFree],
close: [Object],
agentRemove: [Function: onRemove],
drain: [Function: ondrain],
error: [Function: socketErrorListener] },
_eventsCount: 8,
_maxListeners: undefined,
_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: bound onwrite],
writecb: null,
writelen: 0,
bufferedRequest: null,
lastBufferedRequest: null,
pendingcb: 0,
prefinished: true,
errorEmitted: false,
bufferedRequestCount: 0,
corkedRequestsFree: [Object] },
writable: false,
allowHalfOpen: false,
destroyed: true,
_bytesDispatched: 186,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: null,
_server: null,
parser: null,
_httpMessage:
ClientRequest {
domain: null,
_events: [Object],
_eventsCount: 5,
_maxListeners: undefined,
output: [],
outputEncodings: [],
outputCallbacks: [],
outputSize: 0,
writable: true,
_last: true,
upgrading: false,
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 /dinner/login HTTP/1.1\r\nhost: vhost3.lnu.se:20080\r\ncontent-type: application/x-www-form-urlencoded\r\ncontent-length: 40\r\nConnection: close\r\n\r\n',
_headers: [Object],
_headerNames: [Object],
_onPendingData: null,
agent: [Object],
socketPath: undefined,
timeout: undefined,
method: 'POST',
path: '/dinner/login',
_ended: true,
parser: null,
res: [Circular] },
read: [Function],
_consuming: true,
_idleNext: null,
_idlePrev: null,
_idleTimeout: -1 },
connection:
Socket {
connecting: false,
_hadError: false,
_handle: null,
_parent: null,
_host: 'vhost3.lnu.se',
_readableState:
ReadableState {
objectMode: false,
highWaterMark: 16384,
buffer: [Object],
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,
_events:
{ end: [Object],
finish: [Function: onSocketFinish],
_socketEnd: [Function: onSocketEnd],
free: [Function: onFree],
close: [Object],
agentRemove: [Function: onRemove],
drain: [Function: ondrain],
error: [Function: socketErrorListener] },
_eventsCount: 8,
_maxListeners: undefined,
_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: bound onwrite],
writecb: null,
writelen: 0,
bufferedRequest: null,
lastBufferedRequest: null,
pendingcb: 0,
prefinished: true,
errorEmitted: false,
bufferedRequestCount: 0,
corkedRequestsFree: [Object] },
writable: false,
allowHalfOpen: false,
destroyed: true,
_bytesDispatched: 186,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: null,
_server: null,
parser: null,
_httpMessage:
ClientRequest {
domain: null,
_events: [Object],
_eventsCount: 5,
_maxListeners: undefined,
output: [],
outputEncodings: [],
outputCallbacks: [],
outputSize: 0,
writable: true,
_last: true,
upgrading: false,
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 /dinner/login HTTP/1.1\r\nhost: vhost3.lnu.se:20080\r\ncontent-type: application/x-www-form-urlencoded\r\ncontent-length: 40\r\nConnection: close\r\n\r\n',
_headers: [Object],
_headerNames: [Object],
_onPendingData: null,
agent: [Object],
socketPath: undefined,
timeout: undefined,
method: 'POST',
path: '/dinner/login',
_ended: true,
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/1.10.1',
date: 'Fri, 27 Jan 2017 10:55:11 GMT',
'content-type': 'text/plain; charset=utf-8',
'content-length': '35',
connection: 'close',
'x-powered-by': 'Express',
location: 'login/booking',
vary: 'Accept',
'set-cookie': [ 'qi88ZyOC0BVAZDoD6yKSpSessionId=s%3AV6vGBlXevquWzQLWyXrRubICPr88WG6q.t6qR%2FJkMQNxYSbVJjgAiLZIavc2FCRJKRQXO8FWGnLA; Path=/; Expires=Sat, 28 Jan 2017 10:55:11 GMT; HttpOnly' ] },
rawHeaders:
[ 'Server',
'nginx/1.10.1',
'Date',
'Fri, 27 Jan 2017 10:55:11 GMT',
'Content-Type',
'text/plain; charset=utf-8',
'Content-Length',
'35',
'Connection',
'close',
'X-Powered-By',
'Express',
'Location',
'login/booking',
'Vary',
'Accept',
'set-cookie',
'qi88ZyOC0BVAZDoD6yKSpSessionId=s%3AV6vGBlXevquWzQLWyXrRubICPr88WG6q.t6qR%2FJkMQNxYSbVJjgAiLZIavc2FCRJKRQXO8FWGnLA; Path=/; Expires=Sat, 28 Jan 2017 10:55:11 GMT; HttpOnly' ],
trailers: {},
rawTrailers: [],
upgrade: false,
url: '',
method: null,
statusCode: 302,
statusMessage: 'Found',
client:
Socket {
connecting: false,
_hadError: false,
_handle: null,
_parent: null,
_host: 'vhost3.lnu.se',
_readableState:
ReadableState {
objectMode: false,
highWaterMark: 16384,
buffer: [Object],
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,
_events:
{ end: [Object],
finish: [Function: onSocketFinish],
_socketEnd: [Function: onSocketEnd],
free: [Function: onFree],
close: [Object],
agentRemove: [Function: onRemove],
drain: [Function: ondrain],
error: [Function: socketErrorListener] },
_eventsCount: 8,
_maxListeners: undefined,
_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: bound onwrite],
writecb: null,
writelen: 0,
bufferedRequest: null,
lastBufferedRequest: null,
pendingcb: 0,
prefinished: true,
errorEmitted: false,
bufferedRequestCount: 0,
corkedRequestsFree: [Object] },
writable: false,
allowHalfOpen: false,
destroyed: true,
_bytesDispatched: 186,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: null,
_server: null,
parser: null,
_httpMessage:
ClientRequest {
domain: null,
_events: [Object],
_eventsCount: 5,
_maxListeners: undefined,
output: [],
outputEncodings: [],
outputCallbacks: [],
outputSize: 0,
writable: true,
_last: true,
upgrading: false,
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 /dinner/login HTTP/1.1\r\nhost: vhost3.lnu.se:20080\r\ncontent-type: application/x-www-form-urlencoded\r\ncontent-length: 40\r\nConnection: close\r\n\r\n',
_headers: [Object],
_headerNames: [Object],
_onPendingData: null,
agent: [Object],
socketPath: undefined,
timeout: undefined,
method: 'POST',
path: '/dinner/login',
_ended: true,
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],
prefinish: [Function: requestOnPrefinish] },
_eventsCount: 5,
_maxListeners: undefined,
output: [],
outputEncodings: [],
outputCallbacks: [],
outputSize: 0,
writable: true,
_last: true,
upgrading: false,
chunkedEncoding: false,
shouldKeepAlive: false,
useChunkedEncodingByDefault: true,
sendDate: false,
_removedHeader: { 'content-length': false },
_contentLength: null,
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
socket:
Socket {
connecting: false,
_hadError: false,
_handle: null,
_parent: null,
_host: 'vhost3.lnu.se',
_readableState: [Object],
readable: false,
domain: null,
_events: [Object],
_eventsCount: 8,
_maxListeners: undefined,
_writableState: [Object],
writable: false,
allowHalfOpen: false,
destroyed: true,
_bytesDispatched: 186,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: null,
_server: null,
parser: null,
_httpMessage: [Circular],
read: [Function],
_consuming: true,
_idleNext: null,
_idlePrev: null,
_idleTimeout: -1 },
connection:
Socket {
connecting: false,
_hadError: false,
_handle: null,
_parent: null,
_host: 'vhost3.lnu.se',
_readableState: [Object],
readable: false,
domain: null,
_events: [Object],
_eventsCount: 8,
_maxListeners: undefined,
_writableState: [Object],
writable: false,
allowHalfOpen: false,
destroyed: true,
_bytesDispatched: 186,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: null,
_server: null,
parser: null,
_httpMessage: [Circular],
read: [Function],
_consuming: true,
_idleNext: null,
_idlePrev: null,
_idleTimeout: -1 },
_header: 'POST /dinner/login HTTP/1.1\r\nhost: vhost3.lnu.se:20080\r\ncontent-type: application/x-www-form-urlencoded\r\ncontent-length: 40\r\nConnection: close\r\n\r\n',
_headers:
{ host: 'vhost3.lnu.se:20080',
'content-type': 'application/x-www-form-urlencoded',
'content-length': 40 },
_headerNames:
{ host: 'host',
'content-type': 'content-type',
'content-length': 'content-length' },
_onPendingData: null,
agent:
Agent {
domain: null,
_events: [Object],
_eventsCount: 1,
_maxListeners: undefined,
defaultPort: 80,
protocol: 'http:',
options: [Object],
requests: {},
sockets: [Object],
freeSockets: {},
keepAliveMsecs: 1000,
keepAlive: false,
maxSockets: Infinity,
maxFreeSockets: 256 },
socketPath: undefined,
timeout: undefined,
method: 'POST',
path: '/dinner/login',
_ended: true,
parser: null,
res: [Circular] },
request:
Request {
domain: null,
_events:
{ error: [Function: bound ],
complete: [Function: bound ],
pipe: [Function],
data: [Function],
end: [Function] },
_eventsCount: 5,
_maxListeners: undefined,
method: 'POST',
uri:
Url {
protocol: 'http:',
slashes: true,
auth: null,
host: 'vhost3.lnu.se:20080',
port: '20080',
hostname: 'vhost3.lnu.se',
hash: null,
search: null,
query: null,
pathname: '/dinner/login',
path: '/dinner/login',
href: '
http://vhost3.lnu.se:20080/dinner/login' },
callback: [Function],
readable: true,
writable: true,
explicitMethod: true,
_qs:
Querystring {
request: [Circular],
lib: [Object],
useQuerystring: undefined,
parseOptions: {},
stringifyOptions: [Object] },
_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: '2968a595-0c4c-4f44-8cb8-d91b3ee3ea9f',
chunked: false,
body: null },
_redirect:
Redirect {
request: [Circular],
followRedirect: true,
followRedirects: true,
followAllRedirects: false,
followOriginalHttpMethod: false,
allowRedirect: [Function],
maxRedirects: 10,
redirects: [],
redirectsFollowed: 0,
removeRefererHeader: false },
_tunnel:
Tunnel {
request: [Circular],
proxyHeaderWhiteList: [Object],
proxyHeaderExclusiveList: [] },
headers:
{ 'content-type': 'application/x-www-form-urlencoded',
'content-length': 40 },
setHeader: [Function],
hasHeader: [Function],
getHeader: [Function],
removeHeader: [Function],
localAddress: undefined,
pool: {},
dests: [],
__isRequestRequest: true,
_callback: [Function: onLogin],
proxy: null,
tunnel: false,
setHost: true,
originalCookieHeader: undefined,
_disableCookies: true,
_jar: undefined,
port: '20080',
host: 'vhost3.lnu.se',
body: 'username=zeke&password=coys&submit=login',
path: '/dinner/login',
httpModule:
{ IncomingMessage: [Object],
OutgoingMessage: [Object],
METHODS: [Object],
Agent: [Object],
globalAgent: [Object],
ServerResponse: [Object],
STATUS_CODES: [Object],
_connectionListener: [Function: connectionListener],
Server: [Object],
createServer: [Function: createServer],
ClientRequest: [Object],
request: [Function: request],
get: [Function: get] },
agentClass: { [Function: Agent] super_: [Object], defaultMaxSockets: Infinity },
agent:
Agent {
domain: null,
_events: [Object],
_eventsCount: 1,
_maxListeners: undefined,
defaultPort: 80,
protocol: 'http:',
options: [Object],
requests: {},
sockets: [Object],
freeSockets: {},
keepAliveMsecs: 1000,
keepAlive: false,
maxSockets: Infinity,
maxFreeSockets: 256 },
_started: true,
href: '
http://vhost3.lnu.se:20080/dinner/login',
req:
ClientRequest {
domain: null,
_events: [Object],
_eventsCount: 5,
_maxListeners: undefined,
output: [],
outputEncodings: [],
outputCallbacks: [],
outputSize: 0,
writable: true,
_last: true,
upgrading: false,
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 /dinner/login HTTP/1.1\r\nhost: vhost3.lnu.se:20080\r\ncontent-type: application/x-www-form-urlencoded\r\ncontent-length: 40\r\nConnection: close\r\n\r\n',
_headers: [Object],
_headerNames: [Object],
_onPendingData: null,
agent: [Object],
socketPath: undefined,
timeout: undefined,
method: 'POST',
path: '/dinner/login',
_ended: true,
parser: null,
res: [Circular] },
ntick: true,
response: [Circular],
originalHost: 'vhost3.lnu.se:20080',
originalHostHeaderName: 'host',
responseContent: [Circular],
_destdata: true,
_ended: true,
_callbackCalled: true },
toJSON: [Function: responseToJSON],
caseless:
Caseless {
dict:
{ server: 'nginx/1.10.1',
date: 'Fri, 27 Jan 2017 10:55:11 GMT',
'content-type': 'text/plain; charset=utf-8',
'content-length': '35',
connection: 'close',
'x-powered-by': 'Express',
location: 'login/booking',
vary: 'Accept',
'set-cookie': [Object] } },
read: [Function],
body: 'Found. Redirecting to login/booking' }