Skip to content

Instantly share code, notes, and snippets.

View baptistelambert's full-sized avatar

Baptiste Lambert baptistelambert

  • Ecair
  • Paris, France
View GitHub Profile
const { METHODS } = require('http');
const fetch = require('isomorphic-fetch');
const BASE_URL = 'https://jsonplaceholder.typicode.com/';
const api = new Proxy(
{},
{
get(target, propKey) {
const method = METHODS.find(httpMethod =>