{"id":15716722,"url":"https://github.com/zurfyx/superagent-absolute","last_synced_at":"2025-08-07T17:48:14.646Z","repository":{"id":57374635,"uuid":"83161008","full_name":"zurfyx/superagent-absolute","owner":"zurfyx","description":"Superagent with default absolute URLs.","archived":false,"fork":false,"pushed_at":"2017-02-26T13:43:04.000Z","size":5,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T15:11:54.205Z","etag":null,"topics":["absolute","superagent","url"],"latest_commit_sha":null,"homepage":"","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/zurfyx.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":"2017-02-25T20:36:22.000Z","updated_at":"2022-11-18T08:56:21.000Z","dependencies_parsed_at":"2022-08-29T18:32:10.850Z","dependency_job_id":null,"html_url":"https://github.com/zurfyx/superagent-absolute","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/zurfyx%2Fsuperagent-absolute","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zurfyx%2Fsuperagent-absolute/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zurfyx%2Fsuperagent-absolute/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zurfyx%2Fsuperagent-absolute/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zurfyx","download_url":"https://codeload.github.com/zurfyx/superagent-absolute/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250242841,"owners_count":21398207,"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":["absolute","superagent","url"],"created_at":"2024-10-03T21:46:48.525Z","updated_at":"2025-04-22T12:41:30.351Z","avatar_url":"https://github.com/zurfyx.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Superagent Absolute\n\n\u003e Superagent with default absolute URLs.\n\n[![Build Status](https://travis-ci.org/zurfyx/superagent-absolute.svg?branch=master)](https://travis-ci.org/zurfyx/superagent-absolute)\n[![npm version](https://badge.fury.io/js/superagent-absolute.svg)](https://badge.fury.io/js/superagent-absolute)\n\nTired of writing `http://localhost` in front of every [superagent](https://github.com/visionmedia/superagent) request?\nWith superagent absolute you'll only write it once per host in your whole environment.\n\n## Install\n\n```\nnpm install superagent-absolute\n```\n\n## Usage\n\n```\nvar superagent = require('superagent');\nvar superagentAbsolute = require('superagent-absolute');\n\nvar agent = superagent.agent();\nglobal.request = superagentAbsolute(agent)('http://localhost:3030');\n```\n\n## Example\n\n```\nconst superagent = require('superagent');\nconst superagentAbsolute = require('superagent-absolute');\n\nconst agent = superagent.agent();\nconst request = superagentAbsolute(agent)('http://localhost:3030');\n\nit('should should display \"It works!\"', (done) =\u003e {\n  request\n    .get('/')\n    .end((err, res) =\u003e {\n      expect(res.status).to.equal(200);\n      expect(res.body).to.eql({ msg: 'It works!' });\n      done();\n    });\n});\n```\n\nRequested absolute URLs must start with `/`, otherwise they will be treated as relative.\n\n## Related\n\n- [fetch-absolute](https://github.com/zurfyx/fetch-absolute) - Fetch with default absolute URLs.\n\n## License\n\nMIT © [Gerard Rovira Sánchez](//zurfyx.com)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzurfyx%2Fsuperagent-absolute","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzurfyx%2Fsuperagent-absolute","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzurfyx%2Fsuperagent-absolute/lists"}