{"id":18256125,"url":"https://github.com/serapath/minixhr","last_synced_at":"2025-04-04T17:31:52.775Z","repository":{"id":29478266,"uuid":"33015254","full_name":"serapath/minixhr","owner":"serapath","description":"simpel and small cross-browser http-client","archived":false,"fork":false,"pushed_at":"2018-06-12T03:07:50.000Z","size":14,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-13T11:38:49.449Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/minixhr","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/serapath.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":"2015-03-28T00:22:40.000Z","updated_at":"2018-06-12T03:07:52.000Z","dependencies_parsed_at":"2022-09-15T18:30:32.156Z","dependency_job_id":null,"html_url":"https://github.com/serapath/minixhr","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serapath%2Fminixhr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serapath%2Fminixhr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serapath%2Fminixhr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serapath%2Fminixhr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/serapath","download_url":"https://codeload.github.com/serapath/minixhr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223151367,"owners_count":17096098,"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","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":[],"created_at":"2024-11-05T10:20:06.320Z","updated_at":"2024-11-05T10:20:07.495Z","avatar_url":"https://github.com/serapath.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# minixhr\nsuper simple and small cross-browser XMLHttpRequest (XHR)\n\n# USAGE\n```js\nvar minixhr = require('minixhr')\n\nfunction response (error, data, header) {\n  if (error) return console.error(error)\n  console.log(data)\n  console.log(header)\n}\n\nconst string = JSON.stringify({ foo: 123, bar: \"abc\" }) // payload\nconst URL1 = 'https://jsonplaceholder.typicode.com/posts/1'\n// @NOTE check http://requestb.in/18b4srl1?inspect after a request to inspect server\nconst URL2 = 'http://requestb.in/18b4srl1' // make a `http://requestb.in` to get your own\n\nvar request1 = URL1\nvar request2 = { // can be 'url string' or object:\n  /*required*/url     : URL2,\n  /*optional*/method  : 'POST',  // (defaults to `GET`)\n    // can be any http method like `['GET', 'POST', 'HEAD', 'PUT', ...]` or `'JSONP'`\n  /*optional*/data    : string,  // (defaults to: `undefined`)\n    // can be any string, maybe formatted as e.g. \u003cFORMDATA\u003e or JSON e.g. '{\"key\":\"val\"}'\n    // if set and no method provided, method will be set to 'POST'\n  /*optional*/headers : {},      // (defaults to `{}`)\n    // in case of `method === 'POST'` it defaults to:\n    // {'X-Requested-With':'XMLHttpRequest','Content-Type':'application/x-www-form-urlencoded' }\n  /*optional*/timeout : 1000,  // (defaults to `0`, wich means NO timeout)\n    // can be any number of miliseconds, or \"sync\" (to make a synchronous request)\n}\n\n// EXAMPLE 1\nminixhr(/*required*/request1, /*optional*/response)\n\n// EXAMPLE 2\nminixhr(/*required*/request2)\n```\n\nif you need to support old browsers, use version `3.1.0` or below.  \nThose versions still include the [xhr polyfill](https://www.npmjs.com/package/xhrpolyfill)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserapath%2Fminixhr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fserapath%2Fminixhr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserapath%2Fminixhr/lists"}