Virtual Ext
Purpose
Transform a file extension in a url path into an Accept header
### ORIGINAL REQUEST ###
HTTP/2.0 GET /v1/accounts.json
Accept: */*
### TRANSFORMED REQUEST ###
HTTP/2.0 GET /v1/accounts
Accept: application/json
Installation
Via npm
npm install @scuba-squad/virtual-ext
Usage
const express = require('express');
const virtual = require('@scuba-squad/virtual-ext');
const app = express();
app.use(virtual);
Test
npm install
npm test