{"id":21296701,"url":"https://github.com/eccenca/ecc-superagent","last_synced_at":"2025-03-15T17:26:20.782Z","repository":{"id":57110523,"uuid":"118581456","full_name":"eccenca/ecc-superagent","owner":"eccenca","description":"Extended version of superagent.js with RX, better Link header parsing and HTTP Problem support","archived":false,"fork":false,"pushed_at":"2018-04-09T13:48:20.000Z","size":214,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":14,"default_branch":"master","last_synced_at":"2024-04-14T11:51:09.561Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/eccenca.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2018-01-23T08:34:32.000Z","updated_at":"2024-04-14T11:51:09.561Z","dependencies_parsed_at":"2022-08-20T22:20:36.565Z","dependency_job_id":null,"html_url":"https://github.com/eccenca/ecc-superagent","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eccenca%2Fecc-superagent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eccenca%2Fecc-superagent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eccenca%2Fecc-superagent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eccenca%2Fecc-superagent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eccenca","download_url":"https://codeload.github.com/eccenca/ecc-superagent/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243764648,"owners_count":20344459,"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-21T14:29:07.159Z","updated_at":"2025-03-15T17:26:20.762Z","avatar_url":"https://github.com/eccenca.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Eccenca extended Superagent lib (ecc-superagent)\n\nExtended version of Superagent.js to use within eLDS framework\n\n## Usage\n\nIncludes [Superagent.js](https://github.com/visionmedia/superagent) and [Superagent-rx](https://github.com/yamalight/superagent-rx) packages.\nSo, all you need to use it is import and call with your ajax requests:\n\n```js\nimport request from 'ecc-superagent';\n// ...\n// parse results\nrequest\n    .get(requestUrl)\n    .observe() // this returns Rx.Observable\n    .subscribe(function(res) {\n        // use res\n    });\n// use results ...\n```\n\nFuthermore it is possible to register/unregister global superagent plugins to manipulate each request.\nFor Example:\n\n```\nimport request from 'ecc-superagent';\n\n// Register a plugin which sets a header on each request\nrequest.useForEachRequest('setHeaderPlugin', (request) =\u003e {\n    request.set('X-Example-Header', 'FOO');\n    return request;\n});\n\n// The following request will have the X-Example-Header set\nrequest\n    .get('http://example.org')\n    .observe() // this returns Rx.Observable\n    .subscribe(function(res) {\n        // use res\n    });\n\n// Disable the plugin\nrequest.useForEachRequest('setHeaderPlugin', false);\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feccenca%2Fecc-superagent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feccenca%2Fecc-superagent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feccenca%2Fecc-superagent/lists"}