UNPKG

ghunti-devour-client

Version:

A lightweight, framework agnostic, flexible JSON API client

12 lines (10 loc) 230 B
const isEmpty = require('lodash').isEmpty module.exports = { name: 'HTTP_BASIC_AUTH', req: (payload) => { if (!isEmpty(payload.jsonApi.auth)) { payload.req.auth = payload.jsonApi.auth } return payload } }