{"id":20820611,"url":"https://github.com/hubgit/web-resource","last_synced_at":"2025-10-11T12:18:21.619Z","repository":{"id":16774279,"uuid":"19532453","full_name":"hubgit/web-resource","owner":"hubgit","description":"A JavaScript interface for fetching HTTP resources from the web","archived":false,"fork":false,"pushed_at":"2016-01-14T11:37:50.000Z","size":50,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-09T01:25:33.384Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://git.macropus.org/web-resource/demo.html","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hubgit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-05-07T11:47:16.000Z","updated_at":"2019-03-18T03:17:40.000Z","dependencies_parsed_at":"2022-08-25T14:01:29.176Z","dependency_job_id":null,"html_url":"https://github.com/hubgit/web-resource","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/hubgit/web-resource","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hubgit%2Fweb-resource","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hubgit%2Fweb-resource/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hubgit%2Fweb-resource/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hubgit%2Fweb-resource/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hubgit","download_url":"https://codeload.github.com/hubgit/web-resource/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hubgit%2Fweb-resource/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279004908,"owners_count":26083802,"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-10-10T02:00:06.843Z","response_time":62,"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":[],"created_at":"2024-11-17T22:09:39.698Z","updated_at":"2025-10-11T12:18:21.601Z","avatar_url":"https://github.com/hubgit.png","language":"JavaScript","readme":"# web-resource\n\nA JavaScript interface for fetching HTTP resources from the web.\n\n## Features\n\n* Handles rate-limiting, using HTTP response headers.\n* Makes 1 request at a time, per domain (configurable).\n* Pause/resume for queues.\n\n## Demonstration\n\n[A very simple demo](http://git.macropus.org/web-resource/demo.html)\n\n## Usage\n\n```bash\nbower install hubgit/web-resource --save\n```\n\n```html\n\u003clink rel=\"import\" href=\"bower_components/web-resource/import.html\"\u003e\n```\n\nor\n\n```html\n\u003cscript src=\"bower_components/web-resource/queue.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"bower_components/web-resource/request.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"bower_components/web-resource/resource.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"bower_components/web-resource/collection.js\"\u003e\u003c/script\u003e\n```\n\n## Examples\n\n### Fetch a resource as JSON\n\n```javascript\nResource('https://api.spotify.com/v1/artists/5Al98vDcGka3JcJ1WlZYoN').get('json').then(function(data) {\n    // do something with the data\n});\n```\n\n### Fetch a paginated collection, with query parameters\n\n```javascript\nCollection('https://api.spotify.com/v1/search', {\n  type: 'artist',\n  q: 'artist:\"Cows\"'\n}).get('json', {\n    // select the array of items\n    items: function(data) {\n      return data.artists.items;\n    },\n    // select the URL of the next chunk\n    next: function(data) {\n      return data.artists.next;\n    }\n}).then(function(items) {\n  // do something with the items\n});\n```\n\n## CORS\n\nOverride `Request.prototype.prepare` to manipulate the URL and pass the request through a local proxy (e.g. for local caching, or to add CORS headers).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhubgit%2Fweb-resource","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhubgit%2Fweb-resource","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhubgit%2Fweb-resource/lists"}