{"id":23663435,"url":"https://github.com/eyolas/superagent-interface-promise","last_synced_at":"2025-10-08T12:56:11.712Z","repository":{"id":33820282,"uuid":"37517581","full_name":"eyolas/superagent-interface-promise","owner":"eyolas","description":"fork superagent-es6-promise but use an interface for promise","archived":false,"fork":false,"pushed_at":"2015-11-04T13:02:51.000Z","size":115,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-29T10:48:24.951Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eyolas.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-06-16T08:24:13.000Z","updated_at":"2015-07-20T07:33:54.000Z","dependencies_parsed_at":"2022-08-07T23:16:15.565Z","dependency_job_id":null,"html_url":"https://github.com/eyolas/superagent-interface-promise","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eyolas%2Fsuperagent-interface-promise","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eyolas%2Fsuperagent-interface-promise/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eyolas%2Fsuperagent-interface-promise/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eyolas%2Fsuperagent-interface-promise/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eyolas","download_url":"https://codeload.github.com/eyolas/superagent-interface-promise/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239662734,"owners_count":19676435,"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-12-29T05:28:20.580Z","updated_at":"2025-10-08T12:56:11.596Z","avatar_url":"https://github.com/eyolas.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://img.shields.io/travis/eyolas/superagent-interface-promise/master.svg?style=flat-square)](https://travis-ci.org/eyolas/superagent-interface-promise)\n\nsuperagent-interface-promise\n===========================\n\n\nAdd promise support to\n[Superagent](http://visionmedia.github.io/superagent/).\n\nit was initially forked from [superagent-bluebird-promise](https://github.com/KyleAMathews/superagent-bluebird-promise).\n\n## Install\n`npm install superagent-interface-promise`\n\n## Usage\nSimply require this package instead of `superagent`. Then you can call `.then()` instead of `.end()` to get a promise for your requests.\n\n```javascript\nvar request = require('superagent-interface-promise');\n\nrequest.get('/an-endpoint')\n  .then(function(res) {\n    console.log(res);\n  }, function(error) {\n    console.log(error);\n  });\n```\n\nTo generate a promise without registering any callbacks (e.g. when returning a promise from within a library), call `.promise()` instead.\n\n```javascript\nrequest.get('/an-endpoint').promise()\n```\n\n\nAn error is thrown for all HTTP errors and responses that have a response code of 400 or above.\n\nThe `error` parameter always has a key `error` and for 4xx and 5xx responses, will also have a `status` and `res` key.\n\n## Promise\nYou can set the promise library\n```javascript\nvar request = require('superagent-interface-promise');\nvar bluebird = require('bluebird');\nrequest.Promise = bluebird;\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feyolas%2Fsuperagent-interface-promise","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feyolas%2Fsuperagent-interface-promise","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feyolas%2Fsuperagent-interface-promise/lists"}