Advertisement
Guest User

Untitled

a guest
Aug 31st, 2018
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 32.27 KB | None | 0 0
  1. writable: false,
  2. allowHalfOpen: false,
  3. _bytesDispatched: 225,
  4. _sockname: null,
  5. _pendingData: null,
  6. _pendingEncoding: '',
  7. server: undefined,
  8. _server: null,
  9. ssl: null,
  10. _requestCert: true,
  11. _rejectUnauthorized: true,
  12. parser: null,
  13. _httpMessage:
  14. ClientRequest {
  15. domain: null,
  16. _events: [Object],
  17. _eventsCount: 5,
  18. _maxListeners: undefined,
  19. output: [],
  20. outputEncodings: [],
  21. outputCallbacks: [],
  22. outputSize: 0,
  23. writable: true,
  24. _last: true,
  25. upgrading: false,
  26. chunkedEncoding: false,
  27. shouldKeepAlive: false,
  28. useChunkedEncodingByDefault: true,
  29. sendDate: false,
  30. _removedConnection: false,
  31. _removedContLen: false,
  32. _removedTE: false,
  33. _contentLength: null,
  34. _hasBody: true,
  35. _trailer: '',
  36. finished: true,
  37. _headerSent: true,
  38. socket: [Circular],
  39. connection: [Circular],
  40. _header: 'POST /auth/login HTTP/1.1\r\nhost: api.laura-br.com\r\naccept: application/json\r\ncontent-type: application/json\r\ncontent-length: 75\r\nConnection: close\r\n\r\n',
  41. _onPendingData: [Function: noopPendingOutput],
  42. agent: [Object],
  43. socketPath: undefined,
  44. timeout: undefined,
  45. method: 'POST',
  46. path: '/auth/login',
  47. _ended: true,
  48. res: [Circular],
  49. aborted: undefined,
  50. timeoutCb: null,
  51. upgradeOrConnect: false,
  52. parser: null,
  53. maxHeadersCount: null,
  54. [Symbol(outHeadersKey)]: [Object] },
  55. _idleNext: null,
  56. _idlePrev: null,
  57. _idleTimeout: -1,
  58. [Symbol(asyncId)]: 55,
  59. [Symbol(bytesRead)]: 811 },
  60. _consuming: true,
  61. _dumped: false,
  62. req:
  63. ClientRequest {
  64. domain: null,
  65. _events:
  66. { socket: [Function],
  67. response: [Function: bound ],
  68. error: [Function: bound ],
  69. drain: [Function],
  70. prefinish: [Function: requestOnPrefinish] },
  71. _eventsCount: 5,
  72. _maxListeners: undefined,
  73. output: [],
  74. outputEncodings: [],
  75. outputCallbacks: [],
  76. outputSize: 0,
  77. writable: true,
  78. _last: true,
  79. upgrading: false,
  80. chunkedEncoding: false,
  81. shouldKeepAlive: false,
  82. useChunkedEncodingByDefault: true,
  83. sendDate: false,
  84. _removedConnection: false,
  85. _removedContLen: false,
  86. _removedTE: false,
  87. _contentLength: null,
  88. _hasBody: true,
  89. _trailer: '',
  90. finished: true,
  91. _headerSent: true,
  92. socket:
  93. TLSSocket {
  94. _tlsOptions: [Object],
  95. _secureEstablished: true,
  96. _securePending: false,
  97. _newSessionPending: false,
  98. _controlReleased: true,
  99. _SNICallback: null,
  100. servername: 'api.laura-br.com',
  101. npnProtocol: false,
  102. alpnProtocol: false,
  103. authorized: true,
  104. authorizationError: null,
  105. encrypted: true,
  106. _events: [Object],
  107. _eventsCount: 9,
  108. connecting: false,
  109. _hadError: false,
  110. _handle: null,
  111. _parent: null,
  112. _host: 'api.laura-br.com',
  113. _readableState: [Object],
  114. readable: false,
  115. domain: null,
  116. _maxListeners: undefined,
  117. _writableState: [Object],
  118. writable: false,
  119. allowHalfOpen: false,
  120. _bytesDispatched: 225,
  121. _sockname: null,
  122. _pendingData: null,
  123. _pendingEncoding: '',
  124. server: undefined,
  125. _server: null,
  126. ssl: null,
  127. _requestCert: true,
  128. _rejectUnauthorized: true,
  129. parser: null,
  130. _httpMessage: [Circular],
  131. _idleNext: null,
  132. _idlePrev: null,
  133. _idleTimeout: -1,
  134. [Symbol(asyncId)]: 55,
  135. [Symbol(bytesRead)]: 811 },
  136. connection:
  137. TLSSocket {
  138. _tlsOptions: [Object],
  139. _secureEstablished: true,
  140. _securePending: false,
  141. _newSessionPending: false,
  142. _controlReleased: true,
  143. _SNICallback: null,
  144. servername: 'api.laura-br.com',
  145. npnProtocol: false,
  146. alpnProtocol: false,
  147. authorized: true,
  148. authorizationError: null,
  149. encrypted: true,
  150. _events: [Object],
  151. _eventsCount: 9,
  152. connecting: false,
  153. _hadError: false,
  154. _handle: null,
  155. _parent: null,
  156. _host: 'api.laura-br.com',
  157. _readableState: [Object],
  158. readable: false,
  159. domain: null,
  160. _maxListeners: undefined,
  161. _writableState: [Object],
  162. writable: false,
  163. allowHalfOpen: false,
  164. _bytesDispatched: 225,
  165. _sockname: null,
  166. _pendingData: null,
  167. _pendingEncoding: '',
  168. server: undefined,
  169. _server: null,
  170. ssl: null,
  171. _requestCert: true,
  172. _rejectUnauthorized: true,
  173. parser: null,
  174. _httpMessage: [Circular],
  175. _idleNext: null,
  176. _idlePrev: null,
  177. _idleTimeout: -1,
  178. [Symbol(asyncId)]: 55,
  179. [Symbol(bytesRead)]: 811 },
  180. _header: 'POST /auth/login HTTP/1.1\r\nhost: api.laura-br.com\r\naccept: application/json\r\ncontent-type: application/json\r\ncontent-length: 75\r\nConnection: close\r\n\r\n',
  181. _onPendingData: [Function: noopPendingOutput],
  182. agent:
  183. Agent {
  184. domain: null,
  185. _events: [Object],
  186. _eventsCount: 1,
  187. _maxListeners: undefined,
  188. defaultPort: 443,
  189. protocol: 'https:',
  190. options: [Object],
  191. requests: {},
  192. sockets: [Object],
  193. freeSockets: {},
  194. keepAliveMsecs: 1000,
  195. keepAlive: false,
  196. maxSockets: Infinity,
  197. maxFreeSockets: 256,
  198. maxCachedSessions: 100,
  199. _sessionCache: [Object] },
  200. socketPath: undefined,
  201. timeout: undefined,
  202. method: 'POST',
  203. path: '/auth/login',
  204. _ended: true,
  205. res: [Circular],
  206. aborted: undefined,
  207. timeoutCb: null,
  208. upgradeOrConnect: false,
  209. parser: null,
  210. maxHeadersCount: null,
  211. [Symbol(outHeadersKey)]:
  212. { host: [Array],
  213. accept: [Array],
  214. 'content-type': [Array],
  215. 'content-length': [Array] } },
  216. request:
  217. Request {
  218. domain: null,
  219. _events:
  220. { error: [Function: bound ],
  221. complete: [Function: bound ],
  222. pipe: [Function],
  223. data: [Function],
  224. end: [Function] },
  225. _eventsCount: 5,
  226. _maxListeners: undefined,
  227. uri:
  228. Url {
  229. protocol: 'https:',
  230. slashes: true,
  231. auth: null,
  232. host: 'api.laura-br.com',
  233. port: 443,
  234. hostname: 'api.laura-br.com',
  235. hash: null,
  236. search: null,
  237. query: null,
  238. pathname: '/auth/login',
  239. path: '/auth/login',
  240. href: 'https://api.laura-br.com/auth/login' },
  241. method: 'POST',
  242. callback: [Function],
  243. readable: true,
  244. writable: true,
  245. explicitMethod: true,
  246. _qs:
  247. Querystring {
  248. request: [Circular],
  249. lib: [Object],
  250. useQuerystring: undefined,
  251. parseOptions: {},
  252. stringifyOptions: {} },
  253. _auth:
  254. Auth {
  255. request: [Circular],
  256. hasAuth: false,
  257. sentAuth: false,
  258. bearerToken: null,
  259. user: null,
  260. pass: null },
  261. _oauth: OAuth { request: [Circular], params: null },
  262. _multipart:
  263. Multipart {
  264. request: [Circular],
  265. boundary: '8284ef90-d689-47ea-9022-0f8421f2850e',
  266. chunked: false,
  267. body: null },
  268. _redirect:
  269. Redirect {
  270. request: [Circular],
  271. followRedirect: true,
  272. followRedirects: true,
  273. followAllRedirects: false,
  274. followOriginalHttpMethod: false,
  275. allowRedirect: [Function],
  276. maxRedirects: 10,
  277. redirects: [],
  278. redirectsFollowed: 0,
  279. removeRefererHeader: false },
  280. _tunnel:
  281. Tunnel {
  282. request: [Circular],
  283. proxyHeaderWhiteList: [Array],
  284. proxyHeaderExclusiveList: [] },
  285. headers:
  286. { accept: 'application/json',
  287. 'content-type': 'application/json',
  288. 'content-length': 75 },
  289. setHeader: [Function],
  290. hasHeader: [Function],
  291. getHeader: [Function],
  292. removeHeader: [Function],
  293. localAddress: undefined,
  294. pool: {},
  295. dests: [],
  296. __isRequestRequest: true,
  297. _callback: [Function],
  298. proxy: null,
  299. tunnel: true,
  300. setHost: true,
  301. originalCookieHeader: undefined,
  302. _disableCookies: true,
  303. _jar: undefined,
  304. port: 443,
  305. host: 'api.laura-br.com',
  306. path: '/auth/login',
  307. _json: true,
  308. body: '{"email":"chatbot@smarte.rs","password":"TUXLYfZ9oTjRnU8pDr45AbAVLTsiMRe7"}',
  309. httpModule:
  310. { Server: [Object],
  311. createServer: [Function: createServer],
  312. globalAgent: [Object],
  313. Agent: [Object],
  314. request: [Function: request],
  315. get: [Function: get] },
  316. agentClass: { [Function: Agent] super_: [Object] },
  317. agent:
  318. Agent {
  319. domain: null,
  320. _events: [Object],
  321. _eventsCount: 1,
  322. _maxListeners: undefined,
  323. defaultPort: 443,
  324. protocol: 'https:',
  325. options: [Object],
  326. requests: {},
  327. sockets: [Object],
  328. freeSockets: {},
  329. keepAliveMsecs: 1000,
  330. keepAlive: false,
  331. maxSockets: Infinity,
  332. maxFreeSockets: 256,
  333. maxCachedSessions: 100,
  334. _sessionCache: [Object] },
  335. _started: true,
  336. href: 'https://api.laura-br.com/auth/login',
  337. req:
  338. ClientRequest {
  339. domain: null,
  340. _events: [Object],
  341. _eventsCount: 5,
  342. _maxListeners: undefined,
  343. output: [],
  344. outputEncodings: [],
  345. outputCallbacks: [],
  346. outputSize: 0,
  347. writable: true,
  348. _last: true,
  349. upgrading: false,
  350. chunkedEncoding: false,
  351. shouldKeepAlive: false,
  352. useChunkedEncodingByDefault: true,
  353. sendDate: false,
  354. _removedConnection: false,
  355. _removedContLen: false,
  356. _removedTE: false,
  357. _contentLength: null,
  358. _hasBody: true,
  359. _trailer: '',
  360. finished: true,
  361. _headerSent: true,
  362. socket: [Object],
  363. connection: [Object],
  364. _header: 'POST /auth/login HTTP/1.1\r\nhost: api.laura-br.com\r\naccept: application/json\r\ncontent-type: application/json\r\ncontent-length: 75\r\nConnection: close\r\n\r\n',
  365. _onPendingData: [Function: noopPendingOutput],
  366. agent: [Object],
  367. socketPath: undefined,
  368. timeout: undefined,
  369. method: 'POST',
  370. path: '/auth/login',
  371. _ended: true,
  372. res: [Circular],
  373. aborted: undefined,
  374. timeoutCb: null,
  375. upgradeOrConnect: false,
  376. parser: null,
  377. maxHeadersCount: null,
  378. [Symbol(outHeadersKey)]: [Object] },
  379. ntick: true,
  380. response: [Circular],
  381. originalHost: 'api.laura-br.com',
  382. originalHostHeaderName: 'host',
  383. responseContent: [Circular],
  384. _destdata: true,
  385. _ended: true,
  386. _callbackCalled: true },
  387. toJSON: [Function: responseToJSON],
  388. caseless:
  389. Caseless {
  390. dict:
  391. { server: 'nginx/1.13.3',
  392. date: 'Fri, 31 Aug 2018 17:55:05 GMT',
  393. 'content-type': 'application/json',
  394. 'content-length': '16',
  395. connection: 'close',
  396. 'set-cookie': [Array],
  397. vary: 'Origin',
  398. 'strict-transport-security': 'max-age=63072000; includeSubdomains; preload',
  399. 'public-key-pins': 'pin-sha256="klO23nT2ehFDXCfx3eHTDRESMz3asj1muO+4aIdjiuY="; pin-sha256="633lt352PKRXbOwf4xSEa1M517scpD3l5f79xMD9r9Q="; max-age=2592000; includeSubDomains' } },
  400. read: [Function],
  401. body: { location: '/' } }
  402. (node:9171) UnhandledPromiseRejectionWarning: Error: Request failed with status code 404
  403. at createError (/Users/custodio/Documents/nissan/node_modules/axios/lib/core/createError.js:16:15)
  404. at settle (/Users/custodio/Documents/nissan/node_modules/axios/lib/core/settle.js:18:12)
  405. at IncomingMessage.handleStreamEnd (/Users/custodio/Documents/nissan/node_modules/axios/lib/adapters/http.js:201:11)
  406. at emitNone (events.js:111:20)
  407. at IncomingMessage.emit (events.js:208:7)
  408. at endReadableNT (_stream_readable.js:1064:12)
  409. at _combinedTickCallback (internal/process/next_tick.js:138:11)
  410. at process._tickCallback (internal/process/next_tick.js:180:9)
  411. (node:9171) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
  412. (node:9171) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
  413. ^C
  414. Leonardos-MacBook-Pro:nissan custodio$ node index.js
  415. App started on port 5000
  416. [POST] /testdrive
  417. (node:9183) UnhandledPromiseRejectionWarning: Error: Request failed with status code 404
  418. at createError (/Users/custodio/Documents/nissan/node_modules/axios/lib/core/createError.js:16:15)
  419. at settle (/Users/custodio/Documents/nissan/node_modules/axios/lib/core/settle.js:18:12)
  420. at IncomingMessage.handleStreamEnd (/Users/custodio/Documents/nissan/node_modules/axios/lib/adapters/http.js:201:11)
  421. at emitNone (events.js:111:20)
  422. at IncomingMessage.emit (events.js:208:7)
  423. at endReadableNT (_stream_readable.js:1064:12)
  424. at _combinedTickCallback (internal/process/next_tick.js:138:11)
  425. at process._tickCallback (internal/process/next_tick.js:180:9)
  426. (node:9183) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
  427. (node:9183) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
  428. ^C
  429. Leonardos-MacBook-Pro:nissan custodio$ node index.js
  430. App started on port 5000
  431. [POST] /testdrive
  432. { Error: Request failed with status code 404
  433. at createError (/Users/custodio/Documents/nissan/node_modules/axios/lib/core/createError.js:16:15)
  434. at settle (/Users/custodio/Documents/nissan/node_modules/axios/lib/core/settle.js:18:12)
  435. at IncomingMessage.handleStreamEnd (/Users/custodio/Documents/nissan/node_modules/axios/lib/adapters/http.js:201:11)
  436. at emitNone (events.js:111:20)
  437. at IncomingMessage.emit (events.js:208:7)
  438. at endReadableNT (_stream_readable.js:1064:12)
  439. at _combinedTickCallback (internal/process/next_tick.js:138:11)
  440. at process._tickCallback (internal/process/next_tick.js:180:9)
  441. config:
  442. { adapter: [Function: httpAdapter],
  443. transformRequest: { '0': [Function: transformRequest] },
  444. transformResponse: { '0': [Function: transformResponse] },
  445. timeout: 0,
  446. xsrfCookieName: 'XSRF-TOKEN',
  447. xsrfHeaderName: 'X-XSRF-TOKEN',
  448. maxContentLength: -1,
  449. validateStatus: [Function: validateStatus],
  450. headers:
  451. { Accept: 'application/json, text/plain, */*',
  452. 'User-Agent': 'axios/0.18.0' },
  453. method: 'post',
  454. url: 'https://api.laura-br.com/auth/login',
  455. data: '{"email":"chatbot@smarte.rs","password":"TUXLYfZ9oTjRnU8pDr45AbAVLTsiMRe7"}' },
  456. request:
  457. ClientRequest {
  458. domain: null,
  459. _events:
  460. { socket: [Function],
  461. abort: [Function],
  462. aborted: [Function],
  463. error: [Function],
  464. timeout: [Function],
  465. prefinish: [Function: requestOnPrefinish] },
  466. _eventsCount: 6,
  467. _maxListeners: undefined,
  468. output: [],
  469. outputEncodings: [],
  470. outputCallbacks: [],
  471. outputSize: 0,
  472. writable: true,
  473. _last: true,
  474. upgrading: false,
  475. chunkedEncoding: false,
  476. shouldKeepAlive: false,
  477. useChunkedEncodingByDefault: false,
  478. sendDate: false,
  479. _removedConnection: false,
  480. _removedContLen: false,
  481. _removedTE: false,
  482. _contentLength: 0,
  483. _hasBody: true,
  484. _trailer: '',
  485. finished: true,
  486. _headerSent: true,
  487. socket:
  488. TLSSocket {
  489. _tlsOptions: [Object],
  490. _secureEstablished: true,
  491. _securePending: false,
  492. _newSessionPending: false,
  493. _controlReleased: true,
  494. _SNICallback: null,
  495. servername: 'api.laura-br.com',
  496. npnProtocol: false,
  497. alpnProtocol: false,
  498. authorized: true,
  499. authorizationError: null,
  500. encrypted: true,
  501. _events: [Object],
  502. _eventsCount: 9,
  503. connecting: false,
  504. _hadError: false,
  505. _handle: null,
  506. _parent: null,
  507. _host: 'api.laura-br.com',
  508. _readableState: [Object],
  509. readable: false,
  510. domain: null,
  511. _maxListeners: undefined,
  512. _writableState: [Object],
  513. writable: false,
  514. allowHalfOpen: false,
  515. _bytesDispatched: 130,
  516. _sockname: null,
  517. _pendingData: null,
  518. _pendingEncoding: '',
  519. server: undefined,
  520. _server: null,
  521. ssl: null,
  522. _requestCert: true,
  523. _rejectUnauthorized: true,
  524. parser: null,
  525. _httpMessage: [Circular],
  526. _idleNext: null,
  527. _idlePrev: null,
  528. _idleTimeout: -1,
  529. [Symbol(asyncId)]: 32,
  530. [Symbol(bytesRead)]: 231 },
  531. connection:
  532. TLSSocket {
  533. _tlsOptions: [Object],
  534. _secureEstablished: true,
  535. _securePending: false,
  536. _newSessionPending: false,
  537. _controlReleased: true,
  538. _SNICallback: null,
  539. servername: 'api.laura-br.com',
  540. npnProtocol: false,
  541. alpnProtocol: false,
  542. authorized: true,
  543. authorizationError: null,
  544. encrypted: true,
  545. _events: [Object],
  546. _eventsCount: 9,
  547. connecting: false,
  548. _hadError: false,
  549. _handle: null,
  550. _parent: null,
  551. _host: 'api.laura-br.com',
  552. _readableState: [Object],
  553. readable: false,
  554. domain: null,
  555. _maxListeners: undefined,
  556. _writableState: [Object],
  557. writable: false,
  558. allowHalfOpen: false,
  559. _bytesDispatched: 130,
  560. _sockname: null,
  561. _pendingData: null,
  562. _pendingEncoding: '',
  563. server: undefined,
  564. _server: null,
  565. ssl: null,
  566. _requestCert: true,
  567. _rejectUnauthorized: true,
  568. parser: null,
  569. _httpMessage: [Circular],
  570. _idleNext: null,
  571. _idlePrev: null,
  572. _idleTimeout: -1,
  573. [Symbol(asyncId)]: 32,
  574. [Symbol(bytesRead)]: 231 },
  575. _header: 'GET / HTTP/1.1\r\nAccept: application/json, text/plain, */*\r\nUser-Agent: axios/0.18.0\r\nHost: api.laura-br.com\r\nConnection: close\r\n\r\n',
  576. _onPendingData: [Function: noopPendingOutput],
  577. agent:
  578. Agent {
  579. domain: null,
  580. _events: [Object],
  581. _eventsCount: 1,
  582. _maxListeners: undefined,
  583. defaultPort: 443,
  584. protocol: 'https:',
  585. options: [Object],
  586. requests: {},
  587. sockets: [Object],
  588. freeSockets: {},
  589. keepAliveMsecs: 1000,
  590. keepAlive: false,
  591. maxSockets: Infinity,
  592. maxFreeSockets: 256,
  593. maxCachedSessions: 100,
  594. _sessionCache: [Object] },
  595. socketPath: undefined,
  596. timeout: undefined,
  597. method: 'GET',
  598. path: '/',
  599. _ended: true,
  600. res:
  601. IncomingMessage {
  602. _readableState: [Object],
  603. readable: false,
  604. domain: null,
  605. _events: [Object],
  606. _eventsCount: 3,
  607. _maxListeners: undefined,
  608. socket: [Object],
  609. connection: [Object],
  610. httpVersionMajor: 1,
  611. httpVersionMinor: 1,
  612. httpVersion: '1.1',
  613. complete: true,
  614. headers: [Object],
  615. rawHeaders: [Array],
  616. trailers: {},
  617. rawTrailers: [],
  618. upgrade: false,
  619. url: '',
  620. method: null,
  621. statusCode: 404,
  622. statusMessage: 'Not Found',
  623. client: [Object],
  624. _consuming: true,
  625. _dumped: false,
  626. req: [Circular],
  627. responseUrl: 'https://api.laura-br.com/',
  628. redirects: [],
  629. read: [Function] },
  630. aborted: undefined,
  631. timeoutCb: null,
  632. upgradeOrConnect: false,
  633. parser: null,
  634. maxHeadersCount: null,
  635. _redirectable:
  636. Writable {
  637. _writableState: [Object],
  638. writable: true,
  639. domain: null,
  640. _events: [Object],
  641. _eventsCount: 2,
  642. _maxListeners: undefined,
  643. _options: [Object],
  644. _redirectCount: 1,
  645. _redirects: [],
  646. _requestBodyLength: 75,
  647. _requestBodyBuffers: [],
  648. _onNativeResponse: [Function],
  649. _currentRequest: [Circular],
  650. _currentUrl: 'https://api.laura-br.com/',
  651. _isRedirect: true },
  652. [Symbol(outHeadersKey)]: { accept: [Array], 'user-agent': [Array], host: [Array] } },
  653. response:
  654. { status: 404,
  655. statusText: 'Not Found',
  656. headers:
  657. { server: 'nginx/1.13.3',
  658. date: 'Fri, 31 Aug 2018 17:56:25 GMT',
  659. 'content-type': 'text/plain; charset=utf-8',
  660. 'content-length': '19',
  661. connection: 'close',
  662. vary: 'Origin',
  663. 'x-content-type-options': 'nosniff' },
  664. config:
  665. { adapter: [Function: httpAdapter],
  666. transformRequest: [Object],
  667. transformResponse: [Object],
  668. timeout: 0,
  669. xsrfCookieName: 'XSRF-TOKEN',
  670. xsrfHeaderName: 'X-XSRF-TOKEN',
  671. maxContentLength: -1,
  672. validateStatus: [Function: validateStatus],
  673. headers: [Object],
  674. method: 'post',
  675. url: 'https://api.laura-br.com/auth/login',
  676. data: '{"email":"chatbot@smarte.rs","password":"TUXLYfZ9oTjRnU8pDr45AbAVLTsiMRe7"}' },
  677. request:
  678. ClientRequest {
  679. domain: null,
  680. _events: [Object],
  681. _eventsCount: 6,
  682. _maxListeners: undefined,
  683. output: [],
  684. outputEncodings: [],
  685. outputCallbacks: [],
  686. outputSize: 0,
  687. writable: true,
  688. _last: true,
  689. upgrading: false,
  690. chunkedEncoding: false,
  691. shouldKeepAlive: false,
  692. useChunkedEncodingByDefault: false,
  693. sendDate: false,
  694. _removedConnection: false,
  695. _removedContLen: false,
  696. _removedTE: false,
  697. _contentLength: 0,
  698. _hasBody: true,
  699. _trailer: '',
  700. finished: true,
  701. _headerSent: true,
  702. socket: [Object],
  703. connection: [Object],
  704. _header: 'GET / HTTP/1.1\r\nAccept: application/json, text/plain, */*\r\nUser-Agent: axios/0.18.0\r\nHost: api.laura-br.com\r\nConnection: close\r\n\r\n',
  705. _onPendingData: [Function: noopPendingOutput],
  706. agent: [Object],
  707. socketPath: undefined,
  708. timeout: undefined,
  709. method: 'GET',
  710. path: '/',
  711. _ended: true,
  712. res: [Object],
  713. aborted: undefined,
  714. Leonardos-MacBook-Pro:nissan custodio$ node index.js
  715. App started on port 5000
  716. [POST] /testdrive
  717. { Error: Request failed with status code 404
  718. at createError (/Users/custodio/Documents/nissan/node_modules/axios/lib/core/createError.js:16:15)
  719. at settle (/Users/custodio/Documents/nissan/node_modules/axios/lib/core/settle.js:18:12)
  720. at IncomingMessage.handleStreamEnd (/Users/custodio/Documents/nissan/node_modules/axios/lib/adapters/http.js:201:11)
  721. at emitNone (events.js:111:20)
  722. at IncomingMessage.emit (events.js:208:7)
  723. at endReadableNT (_stream_readable.js:1064:12)
  724. at _combinedTickCallback (internal/process/next_tick.js:138:11)
  725. at process._tickCallback (internal/process/next_tick.js:180:9)
  726. config:
  727. { adapter: [Function: httpAdapter],
  728. transformRequest: { '0': [Function: transformRequest] },
  729. transformResponse: { '0': [Function: transformResponse] },
  730. timeout: 0,
  731. xsrfCookieName: 'XSRF-TOKEN',
  732. xsrfHeaderName: 'X-XSRF-TOKEN',
  733. maxContentLength: -1,
  734. validateStatus: [Function: validateStatus],
  735. headers:
  736. { Accept: 'application/json, text/plain, */*',
  737. 'User-Agent': 'axios/0.18.0' },
  738. method: 'post',
  739. url: 'https://api.laura-br.com/auth/login',
  740. data: '{"email":"chatbot@smarte.rs","password":"TUXLYfZ9oTjRnU8pDr45AbAVLTsiMRe7"}' },
  741. request:
  742. ClientRequest {
  743. domain: null,
  744. _events:
  745. { socket: [Function],
  746. abort: [Function],
  747. aborted: [Function],
  748. error: [Function],
  749. timeout: [Function],
  750. prefinish: [Function: requestOnPrefinish] },
  751. _eventsCount: 6,
  752. _maxListeners: undefined,
  753. output: [],
  754. outputEncodings: [],
  755. outputCallbacks: [],
  756. outputSize: 0,
  757. writable: true,
  758. _last: true,
  759. upgrading: false,
  760. chunkedEncoding: false,
  761. shouldKeepAlive: false,
  762. useChunkedEncodingByDefault: false,
  763. sendDate: false,
  764. _removedConnection: false,
  765. _removedContLen: false,
  766. _removedTE: false,
  767. _contentLength: 0,
  768. _hasBody: true,
  769. _trailer: '',
  770. finished: true,
  771. _headerSent: true,
  772. socket:
  773. TLSSocket {
  774. _tlsOptions: [Object],
  775. _secureEstablished: true,
  776. _securePending: false,
  777. _newSessionPending: false,
  778. _controlReleased: true,
  779. _SNICallback: null,
  780. servername: 'api.laura-br.com',
  781. npnProtocol: false,
  782. alpnProtocol: false,
  783. authorized: true,
  784. authorizationError: null,
  785. encrypted: true,
  786. _events: [Object],
  787. _eventsCount: 9,
  788. connecting: false,
  789. _hadError: false,
  790. _handle: null,
  791. _parent: null,
  792. _host: 'api.laura-br.com',
  793. _readableState: [Object],
  794. readable: false,
  795. domain: null,
  796. _maxListeners: undefined,
  797. _writableState: [Object],
  798. writable: false,
  799. allowHalfOpen: false,
  800. _bytesDispatched: 130,
  801. _sockname: null,
  802. _pendingData: null,
  803. _pendingEncoding: '',
  804. server: undefined,
  805. _server: null,
  806. ssl: null,
  807. _requestCert: true,
  808. _rejectUnauthorized: true,
  809. parser: null,
  810. _httpMessage: [Circular],
  811. _idleNext: null,
  812. _idlePrev: null,
  813. _idleTimeout: -1,
  814. [Symbol(asyncId)]: 32,
  815. [Symbol(bytesRead)]: 231 },
  816. connection:
  817. TLSSocket {
  818. _tlsOptions: [Object],
  819. _secureEstablished: true,
  820. _securePending: false,
  821. _newSessionPending: false,
  822. _controlReleased: true,
  823. _SNICallback: null,
  824. servername: 'api.laura-br.com',
  825. npnProtocol: false,
  826. alpnProtocol: false,
  827. authorized: true,
  828. authorizationError: null,
  829. encrypted: true,
  830. _events: [Object],
  831. _eventsCount: 9,
  832. connecting: false,
  833. _hadError: false,
  834. _handle: null,
  835. _parent: null,
  836. _host: 'api.laura-br.com',
  837. _readableState: [Object],
  838. readable: false,
  839. domain: null,
  840. _maxListeners: undefined,
  841. _writableState: [Object],
  842. writable: false,
  843. allowHalfOpen: false,
  844. _bytesDispatched: 130,
  845. _sockname: null,
  846. _pendingData: null,
  847. _pendingEncoding: '',
  848. server: undefined,
  849. _server: null,
  850. ssl: null,
  851. _requestCert: true,
  852. _rejectUnauthorized: true,
  853. parser: null,
  854. _httpMessage: [Circular],
  855. _idleNext: null,
  856. _idlePrev: null,
  857. _idleTimeout: -1,
  858. [Symbol(asyncId)]: 32,
  859. [Symbol(bytesRead)]: 231 },
  860. _header: 'GET / HTTP/1.1\r\nAccept: application/json, text/plain, */*\r\nUser-Agent: axios/0.18.0\r\nHost: api.laura-br.com\r\nConnection: close\r\n\r\n',
  861. _onPendingData: [Function: noopPendingOutput],
  862. agent:
  863. Agent {
  864. domain: null,
  865. _events: [Object],
  866. _eventsCount: 1,
  867. _maxListeners: undefined,
  868. defaultPort: 443,
  869. protocol: 'https:',
  870. options: [Object],
  871. requests: {},
  872. sockets: [Object],
  873. freeSockets: {},
  874. keepAliveMsecs: 1000,
  875. keepAlive: false,
  876. maxSockets: Infinity,
  877. maxFreeSockets: 256,
  878. maxCachedSessions: 100,
  879. _sessionCache: [Object] },
  880. socketPath: undefined,
  881. timeout: undefined,
  882. method: 'GET',
  883. path: '/',
  884. _ended: true,
  885. res:
  886. IncomingMessage {
  887. _readableState: [Object],
  888. readable: false,
  889. domain: null,
  890. _events: [Object],
  891. _eventsCount: 3,
  892. _maxListeners: undefined,
  893. socket: [Object],
  894. connection: [Object],
  895. httpVersionMajor: 1,
  896. httpVersionMinor: 1,
  897. httpVersion: '1.1',
  898. complete: true,
  899. headers: [Object],
  900. rawHeaders: [Array],
  901. trailers: {},
  902. rawTrailers: [],
  903. upgrade: false,
  904. url: '',
  905. method: null,
  906. statusCode: 404,
  907. statusMessage: 'Not Found',
  908. client: [Object],
  909. _consuming: true,
  910. _dumped: false,
  911. req: [Circular],
  912. responseUrl: 'https://api.laura-br.com/',
  913. redirects: [],
  914. read: [Function] },
  915. aborted: undefined,
  916. timeoutCb: null,
  917. upgradeOrConnect: false,
  918. parser: null,
  919. maxHeadersCount: null,
  920. _redirectable:
  921. Writable {
  922. _writableState: [Object],
  923. writable: true,
  924. domain: null,
  925. _events: [Object],
  926. _eventsCount: 2,
  927. _maxListeners: undefined,
  928. _options: [Object],
  929. _redirectCount: 1,
  930. _redirects: [],
  931. _requestBodyLength: 75,
  932. _requestBodyBuffers: [],
  933. _onNativeResponse: [Function],
  934. _currentRequest: [Circular],
  935. _currentUrl: 'https://api.laura-br.com/',
  936. _isRedirect: true },
  937. [Symbol(outHeadersKey)]: { accept: [Array], 'user-agent': [Array], host: [Array] } },
  938. response:
  939. { status: 404,
  940. statusText: 'Not Found',
  941. headers:
  942. { server: 'nginx/1.13.3',
  943. date: 'Fri, 31 Aug 2018 17:57:06 GMT',
  944. 'content-type': 'text/plain; charset=utf-8',
  945. 'content-length': '19',
  946. connection: 'close',
  947. vary: 'Origin',
  948. 'x-content-type-options': 'nosniff' },
  949. config:
  950. { adapter: [Function: httpAdapter],
  951. transformRequest: [Object],
  952. transformResponse: [Object],
  953. timeout: 0,
  954. xsrfCookieName: 'XSRF-TOKEN',
  955. xsrfHeaderName: 'X-XSRF-TOKEN',
  956. maxContentLength: -1,
  957. validateStatus: [Function: validateStatus],
  958. headers: [Object],
  959. method: 'post',
  960. url: 'https://api.laura-br.com/auth/login',
  961. data: '{"email":"chatbot@smarte.rs","password":"TUXLYfZ9oTjRnU8pDr45AbAVLTsiMRe7"}' },
  962. request:
  963. ClientRequest {
  964. domain: null,
  965. _events: [Object],
  966. _eventsCount: 6,
  967. _maxListeners: undefined,
  968. output: [],
  969. outputEncodings: [],
  970. outputCallbacks: [],
  971. outputSize: 0,
  972. writable: true,
  973. _last: true,
  974. upgrading: false,
  975. chunkedEncoding: false,
  976. shouldKeepAlive: false,
  977. useChunkedEncodingByDefault: false,
  978. sendDate: false,
  979. _removedConnection: false,
  980. _removedContLen: false,
  981. _removedTE: false,
  982. _contentLength: 0,
  983. _hasBody: true,
  984. _trailer: '',
  985. finished: true,
  986. _headerSent: true,
  987. socket: [Object],
  988. connection: [Object],
  989. _header: 'GET / HTTP/1.1\r\nAccept: application/json, text/plain, */*\r\nUser-Agent: axios/0.18.0\r\nHost: api.laura-br.com\r\nConnection: close\r\n\r\n',
  990. _onPendingData: [Function: noopPendingOutput],
  991. agent: [Object],
  992. socketPath: undefined,
  993. timeout: undefined,
  994. method: 'GET',
  995. path: '/',
  996. _ended: true,
  997. res: [Object],
  998. aborted: undefined,
  999. timeoutCb: null,
  1000. upgradeOrConnect: false,
  1001. parser: null,
  1002. maxHeadersCount: null,
  1003. _redirectable: [Object],
  1004. [Symbol(outHeadersKey)]: [Object] },
  1005. data: '404 page not found\n' } }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement