node-modules / urllib

Request HTTP(s) URLs in a complex world.
MIT License
726 stars 117 forks source link

ExperimentalWarning: stream/web is an experimental feature. This feature could change at any time #413

Closed turivishal closed 1 year ago

turivishal commented 1 year ago

VERSIONS:

IMPLEMENTATION:

const urllib = require('urllib');
urllib.request(
  "url string", 
  {
    digestAuth: "user:pass",
    headers: { 'Content-Type': 'application/json' }
  }, 
  (error, data, response) => {
    if (error) {
      console.log(error);
    } else {
      console.log(JSON.parse(data));
    }
  }
);

ERROR:

(node:23880) ExperimentalWarning: stream/web is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)


It is working successfully when I use the older version urllib: "^2.38.0"!

fengmk2 commented 1 year ago

@turivishal upgrade Node.js to the latest version of 16

turivishal commented 1 year ago

Thanks, I have updated to the latest node version v16.18.0 and it is working.