Path: csiph.com!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: Mild Shock Newsgroups: comp.lang.javascript Subject: Difference between 3rd party and native [Confusion by Lawrence D'Oliveiro] Date: Wed, 13 Mar 2024 02:16:01 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Wed, 13 Mar 2024 01:16:00 -0000 (UTC) Injection-Info: solani.org; logging-data="1362420"; mail-complaints-to="abuse@news.solani.org" User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0 SeaMonkey/2.53.18.1 Cancel-Lock: sha1:i+qhgEmkKYtibqc05tdmxvfydnQ= X-Mozilla-News-Host: news://news.solani.org:119 X-User-ID: eJwNyskNADAIxMCWOBcoh4DSfwnJ0yO7gjFhcJhfv81VKbYbH4KVEL2iBzy/+qxXkmgWZgU5GbVGZoQ/rfYDIc8UGA== Xref: csiph.com comp.lang.javascript:124291 Important information for Lawrence D'Oliveiro. Basically you need to depend on a 3rd party that did implememt the xmlhttprequest node module. Namely this here: https://www.npmjs.com/package/xmlhttprequest You also need to install it besides the node.js installation itself. You need to install the node module package xmlhttprequest. With fetch() you only need to install node.js, and nothing else. Because since release 21, fetch() is already part of native Node.js. I wrote this already, but I can repeat it of course again and again and again for you: > Notable Changes - Oct 17, 2023 > The recent update to Node.js, version 21, includes > an important change to the fetch module as well as > WebStreams . Both modules were marked as stable > after a recent update. https://nodejs.org/en/blog/announcements/v21-release-announce Please feel free to ask more questions if your skull can not digest the information of a difference between these two concepts: - 3rd party API - native API Best is if you open a separate thread to cleanup your confusion. Or see a psychatrist. Mild Shock schrieb: > Natively Node.js does not provide the browser XHR API. > There is, however, a node module xmlhttprequest that does. > > Lawrence D'Oliveiro schrieb: >> On Tue, 12 Mar 2024 00:19:57 +0100, Mild Shock wrote: >> >>> The same code runs on nodeJS. >>> No need to install some XHR library. >> >> You don’t know how to use XMLHttpRequest directly? >> >