The request module is a small wrapper around the implementation of XHR. Using the net / xhr module provides a standard XMLHttpRequest object that allows you to call methods like setRequestHeader , getAllResponseHeaders and getResponseHeader
source share