Skip to content

Prefix each request URL with another URL unless the URL is absolute.

Notifications You must be signed in to change notification settings

go-fetch-js/prefix-url

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-fetch-prefix-url

Build Status

Prefix each request URL with another URL unless the URL is absolute.

Installation

npm install --save go-fetch-prefix-url

Usage

const Client = require('go-fetch');
const prefixUrl = require('go-fetch-prefix-url');

new Client()
  .use(prefixUrl('https://api.github.com'))
  .get('/repos/go-fetch-js/prefix-url', {'User-Agent': 'go-fetch'})
    .then(res => console.log(res.status))
    .catch(err => console.error(err.stack))
;

About

Prefix each request URL with another URL unless the URL is absolute.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages