Skip to content

Instantly share code, notes, and snippets.

@mzabriskie
Created December 22, 2015 22:07
Show Gist options
  • Save mzabriskie/ea0c6f5b16f35d73369f to your computer and use it in GitHub Desktop.
Save mzabriskie/ea0c6f5b16f35d73369f to your computer and use it in GitHub Desktop.
import axios from 'axios';
axios.defaults.adapter = (resolve, reject, config) => {
let data = null;
let status = 200;
let headers = {};
// Here you would check some registry of request URLs for response
// This would allow you to determine resolve/reject
// Also what is the actual data for the response
resolve({
data,
status,
headers,
config
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment