UNPKG

@megawubs/avid

Version:

API consumption on fire, inspired by Laravel's Eloquent

15 lines (11 loc) 320 B
import {Interaction} from "./interaction"; let axios = require('axios'); export class InteractsWith extends Interaction { then(callback) { let self = this; return axios .post(self.resource, self.params) .then(response => response.data) .then(callback); } }