{"id":22239882,"url":"https://github.com/hmoog/xmlhttprequest-ts","last_synced_at":"2025-07-27T23:32:35.538Z","repository":{"id":57401909,"uuid":"136522732","full_name":"hmoog/xmlhttprequest-ts","owner":"hmoog","description":"XMLHttpRequest-ts is a typescript wrapper for the built-in http client to emulate the browser XMLHttpRequest object and allow isomorphic code that runs in the browser and in node.js.  This can be used with JS designed for browsers to improve reuse of code and allow the use of existing libraries.  Ready for AOT and treeshaking in combination with Angular and other modern typescript frameworks.","archived":false,"fork":false,"pushed_at":"2020-09-21T04:02:16.000Z","size":307,"stargazers_count":2,"open_issues_count":6,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-01T14:01:21.225Z","etag":null,"topics":["angular","aot","nodejs","treeshaking","typescript","xmlhttprequest"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hmoog.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-07T19:37:28.000Z","updated_at":"2024-07-31T06:54:05.000Z","dependencies_parsed_at":"2022-09-15T18:21:53.953Z","dependency_job_id":null,"html_url":"https://github.com/hmoog/xmlhttprequest-ts","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/hmoog/xmlhttprequest-ts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmoog%2Fxmlhttprequest-ts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmoog%2Fxmlhttprequest-ts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmoog%2Fxmlhttprequest-ts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmoog%2Fxmlhttprequest-ts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hmoog","download_url":"https://codeload.github.com/hmoog/xmlhttprequest-ts/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmoog%2Fxmlhttprequest-ts/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267441248,"owners_count":24087771,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular","aot","nodejs","treeshaking","typescript","xmlhttprequest"],"created_at":"2024-12-03T03:24:58.165Z","updated_at":"2025-07-27T23:32:35.216Z","avatar_url":"https://github.com/hmoog.png","language":"TypeScript","readme":"# xmlhttprequest-ts #\n\nxmlhttprequest-ts is a typescript wrapper for the built-in http client to emulate the\nbrowser XMLHttpRequest object and allow isomorphic code that runs in the browser and in node.js.\n\nThis can be used with JS designed for browsers to improve reuse of code and\nallow the use of existing libraries.\n\nReady for AOT and treeshaking in combination with Angular and other modern typescript frameworks.\n\n## Usage ##\n\nHere's how to include the module in your project using the typescript method:\n\n    import { XMLHttpRequest } from 'xmlhttprequest-ts';\n\n    var xhr = new XMLHttpRequest();\n\nHere's how to include the module in your project using the normal node.js method:\n\n    const { XMLHttpRequest } = require(\"xmlhttprequest-ts\");\n\n    var xhr = new XMLHttpRequest();\n\nNote: use the lowercase string \"xmlhttprequest-ts\" in your require(). On\ncase-sensitive systems (eg Linux) using uppercase letters won't work.\n\n## Versions ##\n\nSince the XMLHttpRequest API is stable this library's API is stable as\nwell. Major version numbers indicate significant core code changes.\nMinor versions indicate minor core code changes or better conformity to\nthe W3C spec.\n\n## License ##\n\nMIT license. See LICENSE for full details.\n\n## Supports ##\n\n* Async and synchronous requests\n* GET, POST, PUT, and DELETE requests\n* All spec methods (open, send, abort, getRequestHeader,\n  getAllRequestHeaders, event methods)\n* Requests to all domains\n\n## Known Issues / Missing Features ##\n\nFor a list of open issues or to report your own visit the [github issues\npage](https://github.com/hmoog/xmlhttprequest-ts/issues).\n\n* Local file access may have unexpected results for non-UTF8 files\n* Synchronous requests don't set headers properly\n* Synchronous requests freeze node while waiting for response (But that's what you want, right? Stick with async!).\n* Cookies aren't persisted between requests\n* Missing responseXML support (the DOM doesn't exist in node)\n\n## Fixed Issues ##\n\nThis is a typescript port of [this library](https://github.com/driverdan/node-XMLHttpRequest/) and the following issues were fixed:\n\n* writes the temp files to the temp folder with sync requests for compatibility with AWS Lambda\n* unescapes pathname from url when loading from local filesystem\n* added the constants to both prototype and class itself\n* redirect code now correctly maintains protocol changes and hostname changes\n* added timeout to requests\n* prevents redirect loops by throwing an error\n* prevents reset of headers upon abort\n* correctly supports all events","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhmoog%2Fxmlhttprequest-ts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhmoog%2Fxmlhttprequest-ts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhmoog%2Fxmlhttprequest-ts/lists"}