Created
December 22, 2015 22:07
-
-
Save mzabriskie/ea0c6f5b16f35d73369f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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