JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 290657
  • Score
    100M100P100Q170073F
  • License MIT

XMLHttpRequest polyfill for node.js

Package Exports

  • xhr2-cookies

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (xhr2-cookies) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

XMLHttpRequest polyfill for node.js

Based on https://github.com/pwnall/node-xhr2

  • Adds support for cookies
  • Adds in-project TypeScript type definitions
  • Switched to TypeScript

Cookies

  • saved in XMLHttpRequest.cookieJar
  • saved between redirects
  • saved between requests
  • can be cleared by doing:
import * as Cookie from 'cookiejar';
XMLHttpRequest.cookieJar = Cookie.CookieJar();

Aims

  • Provide full XMLHttpRequest features to Angular Universal HttpClient & node-angular-http-client

Changelog

1.1.0

  • added saving of cookies between requests, not just redirects
  • bug fixes
  • most tests from xhr2 ported over and passing