Quantcast
Channel: Active questions tagged https - Stack Overflow
Viewing all articles
Browse latest Browse all 1573

How to stop axios from printing the GET request automatically?

$
0
0

I am trying to access the html of a product page through its link specifically using axios. When i make the request for this product the program decides to print the entire response on its own, even when there's no console.log() statements.

import axios from 'axios';const link = "https://www.flipkart.com/vega-cliff-motorbike-helmet/p/itmfcz57cwhqvvfj?pid=HLMEEWKHENEQREMN&lid=LSTHLMEEWKHENEQREMNUIPXY0&marketplace=FLIPKART&store=1mt%2Fztf%2Fiv8%2Ftih&srno=b_1_2&otracker=browse&iid=en_mC2lsKHtuWwa0ISQB202udU4Ag_hDkEx8N_o-HI_sUmTiCT6UqHVQXfXTBNd435VMQRjzXCBpgLy-ls26rN5nQ%3D%3D&ssid=dpx48ydrsw0000001733820077201"async function getFlipkartProduct(productLink) {    const response = await axios.get(productLink);    console.log("ok");    return null;}await getFlipkartProduct(link);

Here's the output that prints in the console on its own:

 [Symbol(owner_symbol)]: [Circular *1]        },        _requestCert: true,        _rejectUnauthorized: true,        timeout: 5000,        parser: null,        _httpMessage: null,        [Symbol(alpncallback)]: null,        [Symbol(res)]: TLSWrap {          _parent: TCP {            reading: [Getter/Setter],            onconnection: null,            [Symbol(owner_symbol)]: [Circular *1]          },          _parentWrap: null,          _secureContext: SecureContext { context: SecureContext {} },          reading: true,          onkeylog: [Function: onkeylog],          onhandshakestart: [Function: noop],          onhandshakedone: [Function (anonymous)],          onocspresponse: [Function: onocspresponse],          onnewsession: [Function: onnewsessionclient],          onerror: [Function: onerror],          [Symbol(owner_symbol)]: [Circular *1]        },        [Symbol(verified)]: true,        [Symbol(pendingSession)]: null,        [Symbol(async_id_symbol)]: -1,        [Symbol(kHandle)]: TLSWrap {          _parent: TCP {            reading: [Getter/Setter],            onconnection: null,            [Symbol(owner_symbol)]: [Circular *1]          },          _parentWrap: null,          _secureContext: SecureContext { context: SecureContext {} },          reading: true,          onkeylog: [Function: onkeylog],          onhandshakestart: [Function: noop],          onhandshakedone: [Function (anonymous)],          onocspresponse: [Function: onocspresponse],          onnewsession: [Function: onnewsessionclient],          onerror: [Function: onerror],          [Symbol(owner_symbol)]: [Circular *1]        },        [Symbol(lastWriteQueueSize)]: 0,        [Symbol(timeout)]: <ref *2> Timeout {          _idleTimeout: 5000,          _idlePrev: TimersList {            _idleNext: [Circular *2],            _idlePrev: [Circular *2],            expiry: 5232,            id: -9007199254740991,            msecs: 5000,            priorityQueuePosition: 1          },          _idleNext: TimersList {            _idleNext: [Circular *2],            _idlePrev: [Circular *2],            expiry: 5232,            id: -9007199254740991,            msecs: 5000,            priorityQueuePosition: 1          },          _idleStart: 475,          _onTimeout: [Function: bound ],          _timerArgs: undefined,          _repeat: null,          _destroyed: false,          [Symbol(refed)]: false,          [Symbol(kHasPrimitive)]: false,          [Symbol(asyncId)]: 309,          [Symbol(triggerId)]: 307        },        [Symbol(kBuffer)]: null,        [Symbol(kBufferCb)]: null,        [Symbol(kBufferGen)]: null,        [Symbol(shapeMode)]: true,        [Symbol(kCapture)]: false,        [Symbol(kSetNoDelay)]: false,        [Symbol(kSetKeepAlive)]: true,        [Symbol(kSetKeepAliveInitialDelay)]: 1,        [Symbol(kBytesRead)]: 0,        [Symbol(kBytesWritten)]: 0,        [Symbol(connect-options)]: {          rejectUnauthorized: true,          ciphers: 'TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:DHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA256:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!SRP:!CAMELLIA',          checkServerIdentity: [Function: checkServerIdentity],          minDHSize: 1024,          maxRedirects: 21,          maxBodyLength: Infinity,          protocol: 'https:',          path: null,          method: 'GET',          headers: [Object: null prototype] {            Accept: 'application/json, text/plain, */*','User-Agent': 'axios/1.7.9','Accept-Encoding': 'gzip, compress, deflate, br'          },          agents: { http: undefined, https: undefined },          auth: undefined,          family: undefined,          beforeRedirect: [Function: dispatchBeforeRedirect],          beforeRedirects: { proxy: [Function: beforeRedirect] },          hostname: 'www.flipkart.com',          port: 443,          agent: undefined,          nativeProtocols: { 'http:': [Object], 'https:': [Object] },          pathname: '/vega-cliff-motorbike-helmet/p/itmfcz57cwhqvvfj',          search: '?pid=HLMEEWKHENEQREMN&lid=LSTHLMEEWKHENEQREMNUIPXY0&marketplace=FLIPKART&store=1mt%2Fztf%2Fiv8%2Ftih&srno=b_1_2&otracker=browse&iid=en_mC2lsKHtuWwa0ISQB202udU4Ag_hDkEx8N_o-HI_sUmTiCT6UqHVQXfXTBNd435VMQRjzXCBpgLy-ls26rN5nQ%3D%3D&ssid=dpx48ydrsw0000001733820077201',          _defaultAgent: Agent {            _events: [Object: null prototype],            _eventsCount: 2,            _maxListeners: undefined,            defaultPort: 443,            protocol: 'https:',            options: [Object: null prototype],            requests: [Object: null prototype] {},            sockets: [Object: null prototype] {},            freeSockets: [Object: null prototype],            keepAliveMsecs: 1000,            keepAlive: true,            maxSockets: Infinity,            maxFreeSockets: 256,            scheduling: 'lifo',            maxTotalSockets: Infinity,            totalSocketCount: 1,            maxCachedSessions: 100,            _sessionCache: [Object],            [Symbol(shapeMode)]: false,            [Symbol(kCapture)]: false          },          host: 'www.flipkart.com',          keepAlive: true,          scheduling: 'lifo',          timeout: 5000,          noDelay: true,          servername: 'www.flipkart.com',          _agentKey: 'www.flipkart.com:443:::::::::::::::::::::',          encoding: null,          keepAliveInitialDelay: 1000        }      },      _consuming: false,      _dumped: false,      req: [Circular *3],      _eventsCount: 4,      responseUrl: 'https://www.flipkart.com/vega-cliff-motorbike-helmet/p/itmfcz57cwhqvvfj?pid=HLMEEWKHENEQREMN&lid=LSTHLMEEWKHENEQREMNUIPXY0&marketplace=FLIPKART&store=1mt%2Fztf%2Fiv8%2Ftih&srno=b_1_2&otracker=browse&iid=en_mC2lsKHtuWwa0ISQB202udU4Ag_hDkEx8N_o-HI_sUmTiCT6UqHVQXfXTBNd435VMQRjzXCBpgLy-ls26rN5nQ%3D%3D&ssid=dpx48ydrsw0000001733820077201',      redirects: [],      [Symbol(shapeMode)]: true,      [Symbol(kCapture)]: false,      [Symbol(kHeaders)]: {'access-control-allow-headers': 'x-captcha-validate','access-control-expose-headers': 'x-captcha-validate','access-control-allow-credentials': 'true','access-control-allow-origin': 'https://www.flipkart.com','x-captcha-validate': 'true','content-length': '783','content-type': 'text/html'      },      [Symbol(kHeadersCount)]: 14,      [Symbol(kTrailers)]: null,      [Symbol(kTrailersCount)]: 0    },    aborted: false,    timeoutCb: null,    upgradeOrConnect: false,    parser: null,    maxHeadersCount: null,    reusedSocket: false,    host: 'www.flipkart.com',    protocol: 'https:',    _redirectable: Writable {      _events: {        close: undefined,        error: [Function: handleRequestError],        prefinish: undefined,        finish: undefined,        drain: undefined,        response: [Function: handleResponse],        socket: [Function: handleRequestSocket]      },      _writableState: WritableState {        highWaterMark: 16384,        length: 0,        corked: 0,        onwrite: [Function: bound onwrite],        writelen: 0,        bufferedIndex: 0,        pendingcb: 0,        [Symbol(kState)]: 17580812,        [Symbol(kBufferedValue)]: null      },      _maxListeners: undefined,      _options: {        maxRedirects: 21,        maxBodyLength: Infinity,        protocol: 'https:',        path: '/vega-cliff-motorbike-helmet/p/itmfcz57cwhqvvfj?pid=HLMEEWKHENEQREMN&lid=LSTHLMEEWKHENEQREMNUIPXY0&marketplace=FLIPKART&store=1mt%2Fztf%2Fiv8%2Ftih&srno=b_1_2&otracker=browse&iid=en_mC2lsKHtuWwa0ISQB202udU4Ag_hDkEx8N_o-HI_sUmTiCT6UqHVQXfXTBNd435VMQRjzXCBpgLy-ls26rN5nQ%3D%3D&ssid=dpx48ydrsw0000001733820077201',        method: 'GET',        headers: [Object: null prototype] {          Accept: 'application/json, text/plain, */*','User-Agent': 'axios/1.7.9','Accept-Encoding': 'gzip, compress, deflate, br'        },        agents: { http: undefined, https: undefined },        auth: undefined,        family: undefined,        beforeRedirect: [Function: dispatchBeforeRedirect],        beforeRedirects: { proxy: [Function: beforeRedirect] },        hostname: 'www.flipkart.com',        port: '',        agent: undefined,        nativeProtocols: {'http:': {            _connectionListener: [Function: connectionListener],            METHODS: [Array],            STATUS_CODES: [Object],            Agent: [Function],            ClientRequest: [Function: ClientRequest],            IncomingMessage: [Function: IncomingMessage],            OutgoingMessage: [Function: OutgoingMessage],            Server: [Function: Server],            ServerResponse: [Function: ServerResponse],            createServer: [Function: createServer],            validateHeaderName: [Function],            validateHeaderValue: [Function],            get: [Function: get],            request: [Function: request],            setMaxIdleHTTPParsers: [Function: setMaxIdleHTTPParsers],            maxHeaderSize: [Getter],            globalAgent: [Getter/Setter]          },'https:': {            Agent: [Function: Agent],            globalAgent: [Agent],            Server: [Function: Server],            createServer: [Function: createServer],            get: [Function: get],            request: [Function: request]          }        },        pathname: '/vega-cliff-motorbike-helmet/p/itmfcz57cwhqvvfj',        search: '?pid=HLMEEWKHENEQREMN&lid=LSTHLMEEWKHENEQREMNUIPXY0&marketplace=FLIPKART&store=1mt%2Fztf%2Fiv8%2Ftih&srno=b_1_2&otracker=browse&iid=en_mC2lsKHtuWwa0ISQB202udU4Ag_hDkEx8N_o-HI_sUmTiCT6UqHVQXfXTBNd435VMQRjzXCBpgLy-ls26rN5nQ%3D%3D&ssid=dpx48ydrsw0000001733820077201'      },      _ended: true,      _ending: true,      _redirectCount: 0,      _redirects: [],      _requestBodyLength: 0,      _requestBodyBuffers: [],      _eventsCount: 3,      _onNativeResponse: [Function (anonymous)],      _currentRequest: [Circular *3],      _currentUrl: 'https://www.flipkart.com/vega-cliff-motorbike-helmet/p/itmfcz57cwhqvvfj?pid=HLMEEWKHENEQREMN&lid=LSTHLMEEWKHENEQREMNUIPXY0&marketplace=FLIPKART&store=1mt%2Fztf%2Fiv8%2Ftih&srno=b_1_2&otracker=browse&iid=en_mC2lsKHtuWwa0ISQB202udU4Ag_hDkEx8N_o-HI_sUmTiCT6UqHVQXfXTBNd435VMQRjzXCBpgLy-ls26rN5nQ%3D%3D&ssid=dpx48ydrsw0000001733820077201',      [Symbol(shapeMode)]: true,      [Symbol(kCapture)]: false    },    [Symbol(shapeMode)]: false,    [Symbol(kCapture)]: false,    [Symbol(kBytesWritten)]: 0,    [Symbol(kNeedDrain)]: false,    [Symbol(corked)]: 0,    [Symbol(kOutHeaders)]: [Object: null prototype] {      accept: [ 'Accept', 'application/json, text/plain, */*' ],'user-agent': [ 'User-Agent', 'axios/1.7.9' ],'accept-encoding': [ 'Accept-Encoding', 'gzip, compress, deflate, br' ],      host: [ 'Host', 'www.flipkart.com' ]    },    [Symbol(errored)]: null,    [Symbol(kHighWaterMark)]: 16384,    [Symbol(kRejectNonStandardBodyWrites)]: false,    [Symbol(kUniqueHeaders)]: null  },  response: {    status: 403,    statusText: 'Forbidden',    headers: Object [AxiosHeaders] {'access-control-allow-headers': 'x-captcha-validate','access-control-expose-headers': 'x-captcha-validate','access-control-allow-credentials': 'true','access-control-allow-origin': 'https://www.flipkart.com','x-captcha-validate': 'true','content-length': '783','content-type': 'text/html'    },    config: {      transitional: {        silentJSONParsing: true,        forcedJSONParsing: true,        clarifyTimeoutError: false      },      adapter: [ 'xhr', 'http', 'fetch' ],      transformRequest: [ [Function: transformRequest] ],      transformResponse: [ [Function: transformResponse] ],      timeout: 0,      xsrfCookieName: 'XSRF-TOKEN',      xsrfHeaderName: 'X-XSRF-TOKEN',      maxContentLength: -1,      maxBodyLength: -1,      env: {        FormData: [Function: FormData] {          LINE_BREAK: '\r\n',          DEFAULT_CONTENT_TYPE: 'application/octet-stream'        },        Blob: [class Blob]      },      validateStatus: [Function: validateStatus],      headers: Object [AxiosHeaders] {        Accept: 'application/json, text/plain, */*','Content-Type': undefined,'User-Agent': 'axios/1.7.9','Accept-Encoding': 'gzip, compress, deflate, br'      },      method: 'get',      url: 'https://www.flipkart.com/vega-cliff-motorbike-helmet/p/itmfcz57cwhqvvfj?pid=HLMEEWKHENEQREMN&lid=LSTHLMEEWKHENEQREMNUIPXY0&marketplace=FLIPKART&store=1mt%2Fztf%2Fiv8%2Ftih&srno=b_1_2&otracker=browse&iid=en_mC2lsKHtuWwa0ISQB202udU4Ag_hDkEx8N_o-HI_sUmTiCT6UqHVQXfXTBNd435VMQRjzXCBpgLy-ls26rN5nQ%3D%3D&ssid=dpx48ydrsw0000001733820077201',         data: undefined    },    request: <ref *3> ClientRequest {      _events: [Object: null prototype] {        abort: [Function (anonymous)],        aborted: [Function (anonymous)],        connect: [Function (anonymous)],        error: [Function (anonymous)],        socket: [Function (anonymous)],        timeout: [Function (anonymous)],        finish: [Function: requestOnFinish]      },      _eventsCount: 7,      _maxListeners: undefined,      outputData: [],      outputSize: 0,      writable: true,      destroyed: true,      _last: true,      chunkedEncoding: false,      shouldKeepAlive: true,      maxRequestsOnConnectionReached: false,      _defaultKeepAlive: true,      useChunkedEncodingByDefault: false,      sendDate: false,      _removedConnection: false,      _removedContLen: false,      _removedTE: false,      strictContentLength: false,      _contentLength: 0,      _hasBody: true,      _trailer: '',      finished: true,      _headerSent: true,      _closed: true,      socket: <ref *1> TLSSocket {        _tlsOptions: {          allowHalfOpen: undefined,          pipe: false,          secureContext: SecureContext { context: SecureContext {} },          isServer: false,          requestCert: true,          rejectUnauthorized: true,          session: undefined,          ALPNProtocols: undefined,          requestOCSP: undefined,          enableTrace: undefined,          pskCallback: undefined,          highWaterMark: undefined,          onread: undefined,          signal: undefined        },        _secureEstablished: true,        _securePending: false,        _newSessionPending: false,        _controlReleased: true,        secureConnecting: false,        _SNICallback: null,        servername: 'www.flipkart.com',        alpnProtocol: false,        authorized: true,        authorizationError: null,        encrypted: true,        _events: [Object: null prototype] {          close: [            [Function: onSocketCloseDestroySSL],            [Function],            [Function: onClose]          ],          end: [Function: onReadableStreamEnd],          error: [Function: bound onceWrapper] {            listener: [Function: freeSocketErrorListener]          },          newListener: [Function: keylogNewListener],          connect: undefined,          secure: [Function: onConnectSecure],          session: [Function (anonymous)],          free: [Function: onFree],          timeout: [Function: onTimeout],          agentRemove: [Function: onRemove],          data: undefined,          drain: undefined        },        _eventsCount: 9,        connecting: false,        _hadError: false,        _parent: null,        _host: 'www.flipkart.com',        _closeAfterHandlingError: false,        _readableState: ReadableState {          highWaterMark: 16384,          buffer: [],          bufferIndex: 0,          length: 0,          pipes: [],          awaitDrainWriters: null,          [Symbol(kState)]: 60303620        },        _writableState: WritableState {          highWaterMark: 16384,          length: 0,          corked: 0,          onwrite: [Function: bound onwrite],          writelen: 0,          bufferedIndex: 0,          pendingcb: 0,          [Symbol(kState)]: 17563908,          [Symbol(kBufferedValue)]: null,          [Symbol(kWriteCbValue)]: null        },        allowHalfOpen: false,        _maxListeners: undefined,        _sockname: null,        _pendingData: null,        _pendingEncoding: '',        server: undefined,        _server: null,        ssl: TLSWrap {          _parent: TCP {            reading: [Getter/Setter],            onconnection: null,            [Symbol(owner_symbol)]: [Circular *1]          },          _parentWrap: null,          _secureContext: SecureContext { context: SecureContext {} },          reading: true,          onkeylog: [Function: onkeylog],          onhandshakestart: [Function: noop],          onhandshakedone: [Function (anonymous)],          onocspresponse: [Function: onocspresponse],          onnewsession: [Function: onnewsessionclient],          onerror: [Function: onerror],          [Symbol(owner_symbol)]: [Circular *1]        },        _requestCert: true,        _rejectUnauthorized: true,        timeout: 5000,        parser: null,        _httpMessage: null,        [Symbol(alpncallback)]: null,        [Symbol(res)]: TLSWrap {          _parent: TCP {            reading: [Getter/Setter],            onconnection: null,            [Symbol(owner_symbol)]: [Circular *1]          },          _parentWrap: null,          _secureContext: SecureContext { context: SecureContext {} },          reading: true,          onkeylog: [Function: onkeylog],          onhandshakestart: [Function: noop],          onhandshakedone: [Function (anonymous)],          onocspresponse: [Function: onocspresponse],          onnewsession: [Function: onnewsessionclient],          onerror: [Function: onerror],          [Symbol(owner_symbol)]: [Circular *1]        },        [Symbol(verified)]: true,        [Symbol(pendingSession)]: null,        [Symbol(async_id_symbol)]: -1,        [Symbol(kHandle)]: TLSWrap {          _parent: TCP {            reading: [Getter/Setter],            onconnection: null,            [Symbol(owner_symbol)]: [Circular *1]          },          _parentWrap: null,          _secureContext: SecureContext { context: SecureContext {} },          reading: true,          onkeylog: [Function: onkeylog],          onhandshakestart: [Function: noop],          onhandshakedone: [Function (anonymous)],          onocspresponse: [Function: onocspresponse],          onnewsession: [Function: onnewsessionclient],          onerror: [Function: onerror],          [Symbol(owner_symbol)]: [Circular *1]        },        [Symbol(lastWriteQueueSize)]: 0,        [Symbol(timeout)]: <ref *2> Timeout {          _idleTimeout: 5000,          _idlePrev: TimersList {            _idleNext: [Circular *2],            _idlePrev: [Circular *2],            expiry: 5232,            id: -9007199254740991,            msecs: 5000,            priorityQueuePosition: 1          },          _idleNext: TimersList {            _idleNext: [Circular *2],            _idlePrev: [Circular *2],            expiry: 5232,            id: -9007199254740991,            msecs: 5000,            priorityQueuePosition: 1          },          _idleStart: 475,          _onTimeout: [Function: bound ],          _timerArgs: undefined,          _repeat: null,          _destroyed: false,          [Symbol(refed)]: false,          [Symbol(kHasPrimitive)]: false,          [Symbol(asyncId)]: 309,          [Symbol(triggerId)]: 307        },        [Symbol(kBuffer)]: null,        [Symbol(kBufferCb)]: null,        [Symbol(kBufferGen)]: null,        [Symbol(shapeMode)]: true,        [Symbol(kCapture)]: false,        [Symbol(kSetNoDelay)]: false,        [Symbol(kSetKeepAlive)]: true,        [Symbol(kSetKeepAliveInitialDelay)]: 1,        [Symbol(kBytesRead)]: 0,        [Symbol(kBytesWritten)]: 0,        [Symbol(connect-options)]: {          rejectUnauthorized: true,          ciphers: 'TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:DHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA256:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!SRP:!CAMELLIA',          checkServerIdentity: [Function: checkServerIdentity],          minDHSize: 1024,          maxRedirects: 21,          maxBodyLength: Infinity,          protocol: 'https:',          path: null,          method: 'GET',          headers: [Object: null prototype] {            Accept: 'application/json, text/plain, */*','User-Agent': 'axios/1.7.9','Accept-Encoding': 'gzip, compress, deflate, br'          },          agents: { http: undefined, https: undefined },          auth: undefined,          family: undefined,          beforeRedirect: [Function: dispatchBeforeRedirect],          beforeRedirects: { proxy: [Function: beforeRedirect] },          hostname: 'www.flipkart.com',          port: 443,          agent: undefined,          nativeProtocols: { 'http:': [Object], 'https:': [Object] },          pathname: '/vega-cliff-motorbike-helmet/p/itmfcz57cwhqvvfj',          search: '?pid=HLMEEWKHENEQREMN&lid=LSTHLMEEWKHENEQREMNUIPXY0&marketplace=FLIPKART&store=1mt%2Fztf%2Fiv8%2Ftih&srno=b_1_2&otracker=browse&iid=en_mC2lsKHtuWwa0ISQB202udU4Ag_hDkEx8N_o-HI_sUmTiCT6UqHVQXfXTBNd435VMQRjzXCBpgLy-ls26rN5nQ%3D%3D&ssid=dpx48ydrsw0000001733820077201',          _defaultAgent: Agent {            _events: [Object: null prototype],            _eventsCount: 2,            _maxListeners: undefined,            defaultPort: 443,            protocol: 'https:',            options: [Object: null prototype],            requests: [Object: null prototype] {},            sockets: [Object: null prototype] {},            freeSockets: [Object: null prototype],            keepAliveMsecs: 1000,            keepAlive: true,            maxSockets: Infinity,            maxFreeSockets: 256,            scheduling: 'lifo',            maxTotalSockets: Infinity,            totalSocketCount: 1,            maxCachedSessions: 100,            _sessionCache: [Object],            [Symbol(shapeMode)]: false,            [Symbol(kCapture)]: false          },          host: 'www.flipkart.com',          keepAlive: true,          scheduling: 'lifo',          timeout: 5000,          noDelay: true,          servername: 'www.flipkart.com',          _agentKey: 'www.flipkart.com:443:::::::::::::::::::::',          encoding: null,          keepAliveInitialDelay: 1000        }      },      _header: 'GET /vega-cliff-motorbike-helmet/p/itmfcz57cwhqvvfj?pid=HLMEEWKHENEQREMN&lid=LSTHLMEEWKHENEQREMNUIPXY0&marketplace=FLIPKART&store=1mt%2Fztf%2Fiv8%2Ftih&srno=b_1_2&otracker=browse&iid=en_mC2lsKHtuWwa0ISQB202udU4Ag_hDkEx8N_o-HI_sUmTiCT6UqHVQXfXTBNd435VMQRjzXCBpgLy-ls26rN5nQ%3D%3D&ssid=dpx48ydrsw0000001733820077201 HTTP/1.1\r\n'+'Accept: application/json, text/plain, */*\r\n'+'User-Agent: axios/1.7.9\r\n'+'Accept-Encoding: gzip, compress, deflate, br\r\n'+'Host: www.flipkart.com\r\n'+'Connection: keep-alive\r\n'+'\r\n',      _keepAliveTimeout: 0,      _onPendingData: [Function: nop],      agent: Agent {        _events: [Object: null prototype] {          free: [Function (anonymous)],          newListener: [Function: maybeEnableKeylog]        },        _eventsCount: 2,        _maxListeners: undefined,        defaultPort: 443,        protocol: 'https:',        options: [Object: null prototype] {          keepAlive: true,          scheduling: 'lifo',          timeout: 5000,          noDelay: true,          path: null        },        requests: [Object: null prototype] {},        sockets: [Object: null prototype] {},        freeSockets: [Object: null prototype] {'www.flipkart.com:443:::::::::::::::::::::': [ [TLSSocket] ]        },        keepAliveMsecs: 1000,        keepAlive: true,        maxSockets: Infinity,        maxFreeSockets: 256,        scheduling: 'lifo',        maxTotalSockets: Infinity,        totalSocketCount: 1,        maxCachedSessions: 100,        _sessionCache: {          map: {'www.flipkart.com:443:::::::::::::::::::::': [Buffer [Uint8Array]]          },          list: [ 'www.flipkart.com:443:::::::::::::::::::::' ]        },        [Symbol(shapeMode)]: false,        [Symbol(kCapture)]: false      },      socketPath: undefined,      method: 'GET',      maxHeaderSize: undefined,      insecureHTTPParser: undefined,      joinDuplicateHeaders: undefined,      path: '/vega-cliff-motorbike-helmet/p/itmfcz57cwhqvvfj?pid=HLMEEWKHENEQREMN&lid=LSTHLMEEWKHENEQREMNUIPXY0&marketplace=FLIPKART&store=1mt%2Fztf%2Fiv8%2Ftih&srno=b_1_2&otracker=browse&iid=en_mC2lsKHtuWwa0ISQB202udU4Ag_hDkEx8N_o-HI_sUmTiCT6UqHVQXfXTBNd435VMQRjzXCBpgLy-ls26rN5nQ%3D%3D&ssid=dpx48ydrsw0000001733820077201',      _ended: true, ... some more characters that do not fit in the question...      [Symbol(shapeMode)]: false,      [Symbol(kCapture)]: false,      [Symbol(kBytesWritten)]: 0,      [Symbol(kNeedDrain)]: false,      [Symbol(corked)]: 0,      [Symbol(kOutHeaders)]: [Object: null prototype] {        accept: [ 'Accept', 'application/json, text/plain, */*' ],'user-agent': [ 'User-Agent', 'axios/1.7.9' ],'accept-encoding': [ 'Accept-Encoding', 'gzip, compress, deflate, br' ],        host: [ 'Host', 'www.flipkart.com' ]      },      [Symbol(errored)]: null,      [Symbol(kHighWaterMark)]: 16384,      [Symbol(kRejectNonStandardBodyWrites)]: false,      [Symbol(kUniqueHeaders)]: null    },    data: '<!DOCTYPE html><html lang=en><meta charset=UTF-8><meta content="width=device-width,initial-scale=1"name=viewport><title>Flipkart reCAPTCHA</title><link href=https://static-assets-web.flixcart.com/batman-returns/batman-returns/s/recaptcha.css rel=stylesheet><script src="https://www.google.com/recaptcha/api.js?render=6Lc49B0pAAAAAIVgOhfwW8i7t7SRO0KSnlSVZRAq"></script><script src=https://static-assets-web.flixcart.com/batman-returns/batman-returns/s/recaptcha.js async defer></script><div class=container><img alt="Flipkart Logo"class=logo src="https://rukminim1.flixcart.com/www/60/60/promos/14/06/2024/88011666-ce1d-40f0-a8eb-1bac7d164885.png?q=60"><h1 class=header>Are you a human?</h1><p class=subText>Confirming...<div class=loaderContainer><div class=loader></div></div></div>'  },  status: 403}Node.js v20.18.0

The problem does not occur for other links like amazon product links. How do i prevent it from automatically printing the entire response?


Viewing all articles
Browse latest Browse all 1573

Trending Articles