archive-monorepo/@tornado/xhr2-cookies
T-Hax e676b48b59
fixed-merkle-tree 0.7.3-p0
Signed-off-by: T-Hax <>
2023-05-13 20:52:40 +00:00
..
dist Set up monorepo 2023-05-03 20:35:27 +00:00
test Set up monorepo 2023-05-03 20:35:27 +00:00
.gitignore Set up monorepo 2023-05-03 20:35:27 +00:00
.npmignore Set up monorepo 2023-05-03 20:35:27 +00:00
errors.ts Set up monorepo 2023-05-03 20:35:27 +00:00
index.ts Set up monorepo 2023-05-03 20:35:27 +00:00
package.json fixed-merkle-tree 0.7.3-p0 2023-05-13 20:52:40 +00:00
progress-event.ts Set up monorepo 2023-05-03 20:35:27 +00:00
README.md Set up monorepo 2023-05-03 20:35:27 +00:00
tsconfig.json Set up monorepo 2023-05-03 20:35:27 +00:00
tslint.json Set up monorepo 2023-05-03 20:35:27 +00:00
wallaby.js Set up monorepo 2023-05-03 20:35:27 +00:00
xml-http-request-event-target.ts Set up monorepo 2023-05-03 20:35:27 +00:00
xml-http-request-upload.ts Set up monorepo 2023-05-03 20:35:27 +00:00
xml-http-request.ts Set up monorepo 2023-05-03 20:35:27 +00:00

XMLHttpRequest polyfill for node.js

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

  • 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