1 | # XMLHttpRequest polyfill for node.js
|
2 |
|
3 | Based on [https://github.com/pwnall/node-xhr2](https://github.com/pwnall/node-xhr2)
|
4 |
|
5 | * Adds support for cookies
|
6 | * Adds in-project TypeScript type definitions
|
7 | * Switched to TypeScript
|
8 |
|
9 | ### Cookies
|
10 |
|
11 | * saved in `XMLHttpRequest.cookieJar`
|
12 | * saved between redirects
|
13 | * saved between requests
|
14 | * can be cleared by doing:
|
15 | ```typescript
|
16 | import * as Cookie from 'cookiejar';
|
17 | XMLHttpRequest.cookieJar = Cookie.CookieJar();
|
18 | ```
|
19 |
|
20 | ### Aims
|
21 |
|
22 | * Provide full XMLHttpRequest features to Angular Universal HttpClient &
|
23 | `node-angular-http-client`
|
24 |
|
25 | ### Changelog
|
26 |
|
27 | #### `1.1.0`
|
28 | * added saving of cookies between requests, not just redirects
|
29 | * bug fixes
|
30 | * most tests from `xhr2` ported over and passing
|