popsicle-resolve
v3.0.0
Published
Resolve all Popsicle HTTP request URLs to a common prefix
Downloads
20
Readme
Popsicle Resolve
Resolve Popsicle HTTP request URLs against a prefix.
Installation
npm install popsicle-resolve --save
Usage
import { middleware, toFetch } from "popsicle";
import { Request } from "popsicle/dist/node";
import { resolve } from "popsicle-resolve";
const fetch = toFetch([resolve("http://example.com"), middleware], Request);
fetch("/users.json"); //=> Request("http://example.com/users.json")
License
MIT