{"id":16978703,"url":"https://github.com/srph/axios-base-url","last_synced_at":"2026-05-09T01:06:27.995Z","repository":{"id":75646628,"uuid":"50170966","full_name":"srph/axios-base-url","owner":"srph","description":":nut_and_bolt: An axios interceptor that allows you to set a base url for all requests ","archived":false,"fork":false,"pushed_at":"2016-09-30T12:07:31.000Z","size":11,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-26T17:15:42.395Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/srph.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-01-22T09:19:15.000Z","updated_at":"2022-01-05T10:05:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"f82c075e-91f6-4a09-a7e9-7afc2331a3ac","html_url":"https://github.com/srph/axios-base-url","commit_stats":{"total_commits":27,"total_committers":1,"mean_commits":27.0,"dds":0.0,"last_synced_commit":"208e774e700e16d37823ca390738b1e8fc0a8f3e"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srph%2Faxios-base-url","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srph%2Faxios-base-url/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srph%2Faxios-base-url/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srph%2Faxios-base-url/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/srph","download_url":"https://codeload.github.com/srph/axios-base-url/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244880550,"owners_count":20525511,"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-10-14T01:44:02.937Z","updated_at":"2026-05-09T01:06:22.974Z","avatar_url":"https://github.com/srph.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## axios-base-url [![npm version](http://img.shields.io/npm/v/axios-base-url.svg?style=flat-square)](https://npmjs.org/package/axios-base-url?style=flat-square) [![Build Status](https://img.shields.io/travis/srph/axios-base-url.svg?style=flat-square)](https://travis-ci.org/srph/axios-base-url?branch=master)\nAn [**axios**](https://github.com/mzabriskie/axios) interceptor allowing you to set a base url for all requests.\n\n## Deprecated\naxios **v0.8** already ships base url configuration out of the box. Please use it instead!\n\n## Installation\n```bash\nnpm i axios-base-url -S\n```\n\n## Usage\n```js\nrequire('axios-base-url')('http://graph.facebook.com');\n```\nThat's all you need to do to keep going!\n\n## Ejecting\n`axios-base-url` returns a callback that automatically [ejects](https://github.com/mzabriskie/axios#interceptors) the interceptor.\n```js\nvar eject = require('axios-base-url')('http://graph.facebook.com');\neject();\n```\n\n## Custom Instances\nIn case of [custom instances](https://github.com/mzabriskie/axios#interceptors), you can directly use the function used by the library:\n\n```js\nvar axios = require('axios');\nvar base = require('axios-base-url/base')('http://graph.facebook.com');\naxios.interceptors.request.use(base);\n```\n\n**Note**: You are *requiring* `axios-base-url/base` not `axios-base-url`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrph%2Faxios-base-url","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsrph%2Faxios-base-url","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrph%2Faxios-base-url/lists"}