Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

go-fetch-prefix-url

1.0.2 • Public • Published

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))
;
 

Install

npm i go-fetch-prefix-url

DownloadsWeekly Downloads

3

Version

1.0.2

License

MIT

Last publish

Collaborators

  • avatar